In queuebuffer, if the surfacetexture returns an error,
surfacetextureclient should check for that and pass on the error.
Change-Id: Ie6d70e779fac0702f372eb4df5ecb655280875ee
Added Surface.setPosition(float, float) which allows to set a surface's
position in float.
Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
this bug was introduced recently. in some situations Surface::lock()
is not able to preserve the content of the back buffer and needs
to tell the caller to redraw everything.
Bug: 5186460
Change-Id: I14e03939ddfc1b7ad2a8b99ad79435314c60e78e
This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient. Surface now uses the inherited
SurfaceTextureClient implementation of this query. SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).
Change-Id: Iff187e72f30d454229f07f896b438198978270a8
we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.
Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
we now make sure to drain the buffer queue on disconnect.
this happens only when in synchrnous mode. in async mode
we clear all buffers except the head of the queue.
for extra safety we also catch the null pointer
in updateTexImage (which should never happen) and return
an error.
Bug: 5111008
Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
this simplifies the code a bit and also makes sure
we reevaluate mAbandoned and mConnectedApi each time
we come back from waiting on mDequeueCondition
Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked
Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
This fixes an issue where the Surface readFromParcel code was leaving
unread parcel data in the case where the Surface was re-used from the
sCachedSurfaces cache. On a cache miss the code is creating a new
Surface from the remainder of the parcel data. On a hit that data was
being left unread, so anything that parcels a Surface followed by
additional arguments may end up reading the wrong values.
Change-Id: I25365159d945c125bd1fcc9f17e39a4f00aece55
the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.
Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.
Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
This change relaxes an error check in SurfaceTexture::setBufferCount to
allow clients to explicitly set a buffer count of 2. The clients that
will do this are camera and video decode. Previously it was thought
that for those clients we would always use async mode, which requires a
minimum of 3 buffers. However, we now believe that for some devices it
may make sense to use synchronous mode (with 2 buffers) to reduce memory
usage.
Bug: 5088418
Change-Id: I620a0ef75075745be9d6c8219e0246aaf33ba950
The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.
Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers. It also enables
and fixes the RGB-based SurfaceTexture tests.
Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.
Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
This change adds a test to ensure that a GL driver that's blocking on a
call to dequeueBuffer does not block other GL threads from rendering and
queueing buffers.
Change-Id: Ifdd234effc534b6a9cf8522ca87f64da5bb0bbd6
- fixed uninitialized variable
- set hint to indentity when transform is too complex
- make sure FrameBufferNativeWindow doesn't fail on needed perform commands
Bug: 4487161
Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed. Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.
Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.
Also, Surface now inherits directly from SurfaceTextureClient.
Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object. This will allow us to prevent
multiple simultaneous connections from different processes.
Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
This change fixes a couple different issues in the
SurfaceTextureGLToGLTest test fixture:
- incorrect use of conditions
- move logging after the locks are acquired
- call the parent class's TearDown method
- clean up the SurfaceTexture before eglTerminate gets called
Change-Id: I6960e5ab7f144225f01a2089d3f849c99fed0b38