773 Commits

Author SHA1 Message Date
Jason Sams
bd1c3ad0cd Implement the jni bindings for Adapter2D. Fix a refcount bug in the native adapter implementation. Use adapters in Film to border the mipmaps. 2009-08-03 16:03:08 -07:00
Mathias Agopian
cb21c37853 free surface buffers before trying to allocate new ones, so we have more chance of success 2009-08-03 15:08:16 -07:00
Android (Google) Code Review
cf31b1bcbe Merge change 9397
* changes:
  Fix Win32 libutils to get a working SDK build.
2009-08-01 01:55:07 -07:00
David 'Digit' Turner
078a275784 Fix Win32 libutils to get a working SDK build. 2009-08-01 10:53:29 +02:00
Romain Guy
fcaa31bf65 Clean up Grass RS 2009-07-31 23:30:07 -07:00
Romain Guy
a32d100b34 Add new utility methods to rsScriptC_Lib, android.util.MathUtil and android.graphics.Color.
Fixes RS compilation.
2009-07-31 21:36:18 -07:00
Jason Sams
b8c5a84e7c Split RenderScript Type and Allocation into seperate classes. 2009-07-31 20:40:47 -07:00
Android (Google) Code Review
11d6728af1 Merge change 9413
* changes:
  Begin splitting up RenderScript.java into seperate classes.  First piece split off Element.
2009-07-31 16:29:11 -07:00
Jason Sams
36e612a488 Begin splitting up RenderScript.java into seperate classes. First piece split off Element. 2009-07-31 16:26:13 -07:00
Android (Google) Code Review
d3d88ddab7 Merge changes 9415,9416
* changes:
  log opengl-call-with-no-context only once per thread, instead of for each function call
  don't crash in Parcel when given a null (and therfore invalid) native_handle_t
2009-07-31 16:25:49 -07:00
Mathias Agopian
f1db4aec65 don't crash in Parcel when given a null (and therfore invalid) native_handle_t 2009-07-31 16:18:16 -07:00
Android (Google) Code Review
b5a57ad943 Merge change 9391
* changes:
  be more robust when errors occur upon EGL surface creation (ie: don't crash)
2009-07-31 15:12:54 -07:00
Mathias Agopian
abac01052c be more robust when errors occur upon EGL surface creation (ie: don't crash) 2009-07-31 14:47:00 -07:00
Romain Guy
8839ca5533 Add several math functions to rsScript_Lib. 2009-07-31 11:20:59 -07:00
Romain Guy
8c76cef0c8 Smoother transitions in GrassRS 2009-07-30 22:39:21 -07:00
Romain Guy
584a375df6 First pass at implementing the Grass live wallpaper in RenderScript.
This change also adds second(), minute() and hour() to the RS library.
2009-07-30 19:11:51 -07:00
Android (Google) Code Review
1a20bae18c Merge change 9287
* changes:
  fixed some issues with the software renderer when surfaces are made current.
2009-07-30 18:46:48 -07:00
Mathias Agopian
5b5c914487 fixed some issues with the software renderer when surfaces are made current.
there was several issues:
- when a surface was made non-current, the last frame wasn't shown and the buffer could stay locked
- when a surface was made current the 2nd time, it would not dequeue a new buffer

now, queue/dequeue are done when the surface is made current.

for this to work, a new query() hook had to be added on android_native_window_t, it allows to retrieve some attributes of a window (currently only width and height).
2009-07-30 18:14:56 -07:00
Android (Google) Code Review
afcf686cb0 am 25dff70f: Merge change 9039 into donut
Merge commit '25dff70f153529b87f5ad4a92f4de21e8950b1de'

* commit '25dff70f153529b87f5ad4a92f4de21e8950b1de':
  Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
2009-07-30 16:05:27 -07:00
Android (Google) Code Review
a0afa2dc86 Merge change 9236
* changes:
  Implement bitmap resource loaders for utility.  cleanup rolloRS and checkin maps.png which was missing.
2009-07-30 14:58:14 -07:00
Jason Sams
dba3ba5b5b Implement bitmap resource loaders for utility. cleanup rolloRS and checkin maps.png which was missing. 2009-07-30 14:56:12 -07:00
Android (Google) Code Review
e7f03253f9 Merge change 9070
* changes:
  Adding resizeInput and setAttributes for overlay
2009-07-30 14:37:48 -07:00
Mathias Agopian
5e631892fb Fix a debug statement in BufferMapper 2009-07-30 12:24:41 -07:00
Mathias Agopian
f293b2ff78 NPOT EGLimage without GL_ARB_texture_non_power_of_two would be improperly scalled
The current gralloc allocates buffer memory for render targets that will typically have NPOT dimensions. Assuming that the vendor driver supports converting the resulting NPOT android_native_buffer_t to a NPOT EGLImage, SurfaceFlinger calls glEGLImageTargetTexture2DOES(), and uses glGetError() to test whether the GL can support creating an EGL target texture with the specified NPOT EGLImage. If it is supported, the DIRECT_TEXTURE flag remains set, otherwise it is cleared.

Tangentially, if the driver advertises the GL_ARB_texture_non_power_of_two extension, the NPOT_EXTENSION flag is set, otherwise it is cleared.

If the driver supported creating an EGL target texture from a NPOT source EGLImage, it implicitly creates a NPOT texture. This does not need any glScalef() texture coordinate correction in LayerBase::drawWithOpenGL(). However, the same driver may not advertise the GL_ARB_texture_non_power_of_two extension nor generally support NPOT textures that were not derived from EGLImages. So SurfaceFlinger may flag only DIRECT_TEXTURE, not NPOT_EXTENSION.

Therefore, the test in LayerBase::drawWithOpenGL() should only perform the glScalef() if neither NPOT_EXTENSION or DIRECT_TEXTURE are flagged. Otherwise scaling is applied to NPOT EGL target textures when none is required.
2009-07-30 12:19:10 -07:00
Android (Google) Code Review
6502a380ad Merge change 9090
* changes:
  Simplify image loading.  Use common internal format.
2009-07-29 21:06:23 -07:00
Jason Sams
0ea8c8a7c0 Simplify image loading. Use common internal format. 2009-07-29 21:05:11 -07:00
Android (Google) Code Review
7518f16793 Merge change 9089
* changes:
  Filmstrip work and boxed bitmap load bugfixes.
2009-07-29 20:57:02 -07:00
Jason Sams
faf1520be7 Filmstrip work and boxed bitmap load bugfixes. 2009-07-29 20:55:44 -07:00
Dianne Hackborn
0d221012ff Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
It turns out we were not returning the density for anything retrieved from a
TypedArray...  which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
2009-07-29 19:44:01 -07:00
Benny Wong
4ccee716f8 Adding resizeInput and setAttributes for overlay 2009-07-29 17:53:38 -07:00
Android (Google) Code Review
75ac5fb875 Merge change 9065
* changes:
  Checkin art assets for film test app and change loading of icons to 8888.
2009-07-29 17:43:05 -07:00
Jason Sams
31b532ee9e Checkin art assets for film test app and change loading of icons to 8888. 2009-07-29 17:39:45 -07:00
Android (Google) Code Review
b2b28f3122 am 1521cd6e: Merge change 8015 into donut
Merge commit '1521cd6e657ba4efa9382ab73d3cbba3bdf50ead'

* commit '1521cd6e657ba4efa9382ab73d3cbba3bdf50ead':
  Reset the mDpiX and mDpiY values when qemu.sf.lcd_density is defined.
2009-07-29 14:47:41 -07:00
Android (Google) Code Review
afa7d85b43 Merge change 9008
* changes:
  Only restore the bits for wallpapers that aren't built in.
2009-07-29 14:10:12 -07:00
Joe Onorato
9bb8fd77c8 Only restore the bits for wallpapers that aren't built in. 2009-07-29 12:05:36 -07:00
Android (Google) Code Review
d058ee0198 Merge change 8987
* changes:
  Fix firestone build
2009-07-29 09:50:29 -07:00
Marco Nelissen
ee028d5771 Fix firestone build 2009-07-29 09:47:23 -07:00
Android (Google) Code Review
700a52ac7a Merge changes 8935,8936
* changes:
  Fix the IOException in wallpaper restore -- the padding isn't required at the end.
  Fix bug 1982892 - batteryservice turns off device even while plugged in
2009-07-28 20:20:02 -07:00
Android (Google) Code Review
e1c00aab87 Merge change 8931
* changes:
  fix [1985856] Seg fault when using the soft keyboard in the Messaging app
2009-07-28 19:18:32 -07:00
Mathias Agopian
c915d0a33c fix [1985856] Seg fault when using the soft keyboard in the Messaging app 2009-07-28 19:17:54 -07:00
Joe Onorato
8d72569e3b Fix the IOException in wallpaper restore -- the padding isn't required at the end. 2009-07-28 18:30:15 -07:00
Android (Google) Code Review
3eb4344878 Merge change 8901
* changes:
  Add new icons and implement text. Fix bug with uploading 8888 bitmaps of non-square size.
2009-07-28 17:22:23 -07:00
Jason Sams
6f5c61c8df Add new icons and implement text. Fix bug with uploading 8888 bitmaps of non-square size. 2009-07-28 17:20:11 -07:00
Android (Google) Code Review
ec5d683335 Merge change 8839
* changes:
  Fix selection and change icon loading from 565 to 8888.
2009-07-28 17:19:00 -07:00
Android (Google) Code Review
1521cd6e65 Merge change 8015 into donut
* changes:
  Reset the mDpiX and mDpiY values when qemu.sf.lcd_density is defined.
2009-07-28 16:16:38 -07:00
David 'Digit' Turner
d75fe9aa83 Reset the mDpiX and mDpiY values when qemu.sf.lcd_density is defined.
This will make android.view.Display return corresponding values for
the screen's DPI.
2009-07-29 00:38:58 +02:00
Android (Google) Code Review
6c70a8b76b Merge change 8858
* changes:
  resolved conflicts for merge of ac38dfc5 to master
2009-07-28 14:21:23 -07:00
Mathias Agopian
33863dd9e1 resolved conflicts for merge of ac38dfc5 to master 2009-07-28 14:20:21 -07:00
Jason Sams
37d7fc70dd Fix selection and change icon loading from 565 to 8888. 2009-07-28 12:20:28 -07:00
Android (Google) Code Review
a590434559 Merge change 8835
* changes:
  Add "boxed" bitmap uploads which simply place a non-pow2 bitmap into the smallest larger pow texture.  The added space is filled black.
2009-07-28 12:03:46 -07:00