Commit Graph

119 Commits

Author SHA1 Message Date
Mathias Agopian
6cf50a770d added two EGL helpers for selecting a config matching a certain pixelformat or native window type 2009-08-06 16:05:39 -07:00
Mathias Agopian
a03f7c9170 free surface buffers before trying to allocate new ones, so we have more chance of success 2009-08-03 15:08:16 -07:00
Mathias Agopian
f9cd64bc6c 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
e437ff8099 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
Mathias Agopian
672136f3e6 fix [1985856] Seg fault when using the soft keyboard in the Messaging app 2009-07-28 19:17:54 -07:00
Android (Google) Code Review
7f5989e19b 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
31469e1069 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
Mathias Agopian
5d7126b625 resolved conflicts for merge of ac38dfc5 to master 2009-07-28 14:20:21 -07:00
Mathias Agopian
970112231e fix [2017532] Partial Update leaves residual image. 2009-07-28 10:57:27 -07:00
Rebecca Schultz Zavin
1000170033 Add a flag to set whether the overlay has been initialized. Commit needs to be called at least once on each overlay, and it appears that sometimes this
doesn't happen because the visibility never changes.  With this change
the overlay parameter and position will be committed when either the visibility
of the window changes, or on the first call to visibility resolved, if it
hasn't already been done.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-07-22 17:17:46 -07:00
Rebecca Schultz Zavin
96df49bb7d Fix hardware overlay so all changes are commited when done. 2009-07-21 11:07:23 -07:00
Mathias Agopian
d606003a66 first attempt to fix the sim 2009-07-13 22:58:25 -07:00
Mathias Agopian
ec0f1f6720 implement Mutex and Condition with pthread instead of calling futex directly.
internally pthread uses futex. the implementation consists of simple inlines
there are no implementation files anymore.
2009-07-13 15:14:23 -07:00
Mathias Agopian
5cd5d31d10 fix [1967226] Donut orientation animation (dimming and blur) is slower than Cupcake 2009-07-10 17:00:00 -07:00
Mike Reed
e0528ba71b rename libsgl/libcorecg to libskia 2009-07-10 15:33:21 -04:00
Android (Google) Code Review
829cb1304b Merge change 6742
* changes:
  fix [1969200] Uninitialized double passed to Math.sqrt()
2009-07-09 22:12:36 -07:00
Mathias Agopian
80d7a764fc fix [1969200] Uninitialized double passed to Math.sqrt() 2009-07-09 22:11:57 -07:00
Mathias Agopian
4860b74b47 am 4d2dbebf: fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
Merge commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f'

* commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f':
  fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
2009-07-09 20:05:11 -07:00
Mathias Agopian
6e2d6483fe fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624 2009-07-09 18:16:43 -07:00
Mathias Agopian
84f6814af4 fix for [1969185] valgrind errors in new gl stuff 2009-07-09 17:30:43 -07:00
Mathias Agopian
1df3bbb8d8 trying to fix the sim, I'm not even sure this syntaxe is valid, but my compilo doesn't complain 2009-07-06 19:04:55 -07:00
Mathias Agopian
af54ab9d88 don't need to link against libsgl 2009-07-02 19:04:39 -07:00
Mathias Agopian
7303c6bf1a get rid of references to MemoryDealer in SurfaceFlinger 2009-07-02 18:50:51 -07:00
Mathias Agopian
6b5513538a forgot to remove those files 2009-07-02 18:46:57 -07:00
Mathias Agopian
759fdb2ef7 free gralloc buffers as soon as possible (when a surface is not visible any longer), client who have the buffers still mapped won't crash, btu may see garbage data 2009-07-02 18:45:29 -07:00
Mathias Agopian
84d1f7a098 Merge commit 'goog/master' into merge_master 2009-07-01 18:33:18 -07:00
Mathias Agopian
78f1c1949f Allocate 16MB for surfaces on Firstone, since 8MB is way to small for our bigger screen. 2009-07-01 17:47:38 -07:00
Android (Google) Code Review
99da6dd7f2 am 58ebdcc0: Merge change 5625 into donut
Merge commit '58ebdcc06eca06741460a7db2be4b79e3865eb88'

* commit '58ebdcc06eca06741460a7db2be4b79e3865eb88':
  fix [1947273] the DimLayer causes the whole screen to update during transactions
2009-07-01 00:06:47 -07:00
Mathias Agopian
2dd6727c46 when there is a choice between UPDATE_ON_DEMAND and SWAP_BUFFER optimizations, choose UPDATE_ON_DEMAND which is often more efficient. 2009-06-29 18:57:42 -07:00
Mathias Agopian
29d06ac9a4 fix a bug that caused artifacts when SWAP_RECTANGLE was enabled 2009-06-29 18:49:56 -07:00
Mathias Agopian
446ff92038 don't use a 1/4th of the screen size texture for the dim layer
we can't use a texture of 1/4th of the screen for the dim layer, because the mdp internal input resultion is alwyas integers and for very small blits of a couple pixels the scale factor can get way out of range, for instance for a 7 pixels source, the scale factor would be either 7 (7/1) or 3.5 (7/2) instead of 4 (7/1.75). This caused the mdp to fail in some cases and revert to software. we now always use a texture of the actual screen size, so the problem will never happen. This burns 300KB of pmem instead of 21KB. On devices with a larger screen we might want to use a smaller texture and tile it by hand.
2009-06-29 17:32:20 -07:00
Mathias Agopian
a8d44f75e1 fix [1947273] the DimLayer causes the whole screen to update during transactions 2009-06-29 14:44:11 -07:00
Mathias Agopian
6b3287b5d4 fix [1947273] the DimLayer causes the whole screen to update during transactions 2009-06-28 02:54:16 -07:00
Mathias Agopian
b8a5560e13 fix an update bug with SHOW_UPDATE debug feature. Fix a problem with the debug binder codes too 2009-06-26 19:06:36 -07:00
Mathias Agopian
d512f238a6 add support for out-of-range copybit scaling. camera capture is in color again 2009-06-25 17:41:12 -07:00
Mathias Agopian
958b3cac99 use 1/16 the size (20KB) for the dim texture in the copybit/msm case 2009-06-25 16:21:32 -07:00
Mathias Agopian
240c9fe59e use copybit for eglSwapBuffers() copy-back operations 2009-06-25 15:39:25 -07:00
Mathias Agopian
2ab55a4e31 make use of new eglGetRenderBufferANDROID extension to clean-up a bit a few hacks added recently 2009-06-25 00:09:27 -07:00
Mathias Agopian
5911aa9510 copybit now uses a native_handle_t* instead of a fd/offset 2009-06-24 20:39:16 -07:00
Mathias Agopian
69029eb5ab hack copybit back in for video playback on msm7k. we have h/w accelerated video again 2009-06-24 20:39:16 -07:00
Mathias Agopian
2e12324581 fix a bug causing push-buffer surfaces' identity to be garbage, which resulted in some attributes (size/pos) to fail to be set 2009-06-23 20:06:46 -07:00
Mathias Agopian
1fed11c86a checkpoint. bring back video/camera 2009-06-23 18:08:22 -07:00
Mathias Agopian
cca6b4267d Merge commit 'goog/master' into merge_master 2009-06-19 17:41:14 -07:00
Mathias Agopian
f9d932774e fix a memory corruption where a SF Client could be used after it's been destroyed 2009-06-19 17:00:27 -07:00
Mathias Agopian
cd8c5e29c2 release the last reference to surfaces explicitely instead of letting it go implicitely when the message is destroyed 2009-06-19 16:24:02 -07:00
Android (Google) Code Review
05915a4d9d am c6282977: Merge change 4718 into donut
Merge commit 'c6282977180c220b1a68c23a328e7d75a11963ab'

* commit 'c6282977180c220b1a68c23a328e7d75a11963ab':
  Fix sim-eng build and simplify previous lcd-density related patch
2009-06-18 19:46:59 -07:00
David 'Digit' Turner
ae71accf63 Fix sim-eng build and simplify previous lcd-density related patch 2009-06-19 04:41:12 +02:00
Mathias Agopian
945ebbfd3d implement dimming with a texture on msm7k so it uses copybit 2009-06-18 18:48:39 -07:00
Android (Google) Code Review
e2095d0a1c am b1cdb648: Merge change 4565 into donut
Merge commit 'b1cdb64877ebd3b8c5182913ff02edd8b54a6982'

* commit 'b1cdb64877ebd3b8c5182913ff02edd8b54a6982':
  Allow the qemu.sf.lcd_density property to override the value of ro.sf.lcd_density
2009-06-18 15:43:28 -07:00
David 'Digit' Turner
694e10ba87 Allow the qemu.sf.lcd_density property to override the value of ro.sf.lcd_density
ro.sf.lcd_density is usually defined in the build.prop file which is parsed by init
before anything else. Since its name begins with "ro.", this property is write-once
and cannot later be modified, e.g. in /system/etc/init.goldfish.sh.

In other words, you cannot use "emulator -prop ro.sf.lcd_density=<value>", since
it is impossible to override the value defined in build.prop

This patch modifies the system to recognize "qemu.sf.lcd_density" as an override
value, which can be set with "emulator -prop qemu.sf.lcd_density=<value>", forcing
a specific density.

A later patch will allow the emulator to automatically set this property depending
on AVD hardware configuration settings.
2009-06-19 00:17:31 +02:00