Go to file
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
awt Removed system/framework/android.awt.jar. 2009-07-02 14:11:33 -05:00
camera/libcameraservice Fix issue 1795088 Improve audio routing code 2009-07-23 06:03:39 -07:00
cmds am 75b68163: Add memcpy and strcpy boundary check. 2009-07-24 12:52:33 -07:00
im/java/android/im auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
include Fix issue 1795088 Improve audio routing code 2009-07-23 06:03:39 -07:00
libs NPOT EGLimage without GL_ARB_texture_non_power_of_two would be improperly scalled 2009-07-30 12:19:10 -07:00
opengl GLESv2 couldn't be loaded due to wrong path specification 2009-07-29 11:10:29 -07:00
vpn/java/android/net/vpn Make VPN connect even when DNS is not present and other fixes. 2009-07-14 16:29:22 +08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
NOTICE Start using CLDR for some date-and-time strings and formats. 2009-05-15 10:15:50 -07:00