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).
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.
Merge commit 'b91e2b0292f9f4f76175a18e6e3cf392f3967ae8'
* commit 'b91e2b0292f9f4f76175a18e6e3cf392f3967ae8':
Special-case search within the browser to not show the app icon
Merge commit '9c71716e3de9b6a7e1830cae13da35ebdeeaaa80'
* commit '9c71716e3de9b6a7e1830cae13da35ebdeeaaa80':
Fixing bug #2023024 - there is an out of bounds exception that
Merge commit '41c104339951e0e5e78240e1f48455c21b3ba5fd'
* commit '41c104339951e0e5e78240e1f48455c21b3ba5fd':
Fix MulticastLock API to match WifiLock API.
Merge commit '0067057c31720f64926d6ee3d841b15dc197d2df'
* commit '0067057c31720f64926d6ee3d841b15dc197d2df':
Fix the TabWidget to display custom views for the tabs better when the tabs have different sizes.
Merge commit 'b307c8945d4bf8d843445f3cc6d727f4e43d90f0'
* commit 'b307c8945d4bf8d843445f3cc6d727f4e43d90f0':
Fix bug 1994955 where PHONE_TYPE_CDMA was 0 and it should be 2 and added RILConstants.NO_PHONE.
* changes:
Special-case search within the browser to not show the app icon to the left of the search field. Also, because this removes context about whether you're in browser search or global search, we make sure to clear any entered text if you jump out to global search from within browser search.
* changes:
Fixing bug #2023024 - there is an out of bounds exception that can happen if services are going away as the AccessibilityManagerService is trying to dispatch notifications to these services. Catching this exception and bailing because having this exception means that there are no more services around that need to get this notification.
Merge commit '0869f7ef1efa9fe2e26b20e525952ad611d379aa'
* commit '0869f7ef1efa9fe2e26b20e525952ad611d379aa':
Log uid and package name when launching intents from search
Merge commit '67897b1af7ab7bea1dc3f9caf5f3ee5c026a179d'
* commit '67897b1af7ab7bea1dc3f9caf5f3ee5c026a179d':
DO NOT MERGE. Already in master. Fix calendar test.
Merge commit '1521cd6e657ba4efa9382ab73d3cbba3bdf50ead'
* commit '1521cd6e657ba4efa9382ab73d3cbba3bdf50ead':
Reset the mDpiX and mDpiY values when qemu.sf.lcd_density is defined.
* changes:
Allow zero-length lists in EventLog entries. (I'm verifying that the consumers of EventLog -- logcat, checkin -- are OK with this.) Improve the error handling in RestoreSession.
* changes:
Fix bug 2017664 Removed the TTS_ prefix in the TextToSpeech class to follow the standard naming convention. Moved the TTS-related intents from the Intent class to TextToSpeech and TextToSpeech.Engine. Renamed the TextToSpeech.Engine constants that are used as extras for the ACTION_TTS_CHECK_TTS_DATA intent to prefix them with EXTRA_. Cleaned up the other TextToSpeech.Engine constant to remove superfluous mentions of "TTS" in the name.