replicant-frameworks_native/libs/surfaceflinger
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
..
DisplayHardware am 1521cd6e: Merge change 8015 into donut 2009-07-29 14:47:41 -07:00
purgatory don't need to link against libsgl 2009-07-02 19:04:39 -07:00
tests merge master to master_gl 2009-05-22 02:16:08 -07:00
Android.mk first attempt to fix the sim 2009-07-13 22:58:25 -07:00
Barrier.h
BlurFilter.cpp
BlurFilter.h
BufferAllocator.cpp
BufferAllocator.h
clz.cpp
clz.h
Layer.cpp 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
Layer.h get rid of references to MemoryDealer in SurfaceFlinger 2009-07-02 18:50:51 -07:00
LayerBase.cpp NPOT EGLimage without GL_ARB_texture_non_power_of_two would be improperly scalled 2009-07-30 12:19:10 -07:00
LayerBase.h 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
LayerBitmap.cpp fix [1985856] Seg fault when using the soft keyboard in the Messaging app 2009-07-28 19:17:54 -07:00
LayerBitmap.h get rid of references to MemoryDealer in SurfaceFlinger 2009-07-02 18:50:51 -07:00
LayerBlur.cpp fix a memory corruption where a SF Client could be used after it's been destroyed 2009-06-19 17:00:27 -07:00
LayerBlur.h fix a memory corruption where a SF Client could be used after it's been destroyed 2009-06-19 17:00:27 -07:00
LayerBuffer.cpp 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 2009-07-22 17:17:46 -07:00
LayerBuffer.h 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 2009-07-22 17:17:46 -07:00
LayerDim.cpp don't use a 1/4th of the screen size texture for the dim layer 2009-06-29 17:32:20 -07:00
LayerDim.h fix a memory corruption where a SF Client could be used after it's been destroyed 2009-06-19 17:00:27 -07:00
MessageQueue.cpp implement Mutex and Condition with pthread instead of calling futex directly. 2009-07-13 15:14:23 -07:00
MessageQueue.h
MODULE_LICENSE_APACHE2
SurfaceFlinger.cpp resolved conflicts for merge of ac38dfc5 to master 2009-07-28 14:20:21 -07:00
SurfaceFlinger.h resolved conflicts for merge of ac38dfc5 to master 2009-07-28 14:20:21 -07:00
Tokenizer.cpp
Tokenizer.h
Transform.cpp
Transform.h