This change adds the plumbing to SurfaceTextureClient, BufferQueue, and
SurfaceTexture to get the active rectangle passed to the ANativeWindow to
the buffer consumer.
Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
Fixed AttachToContextSucceeds test SurfaceTexture test by
not deleting the current texture when cleaning up memory.
Bug: 6363186
Change-Id: Ib886bfe6bb86e25ea4825d18b5008afba6b33eae
indeed, connect and queueBuffer return the same data, so it's
easier to have them use the same protocol.
Change-Id: I4f9fa3be0a80c9ab0a7a4039b282ae843aab02e1
Remove C++ APIs androidSetThreadSchedulingGroup and
androidGetThreadSchedulingGroup, and the ANDROID_TGROUP_* constants.
Former callers of these should now use the C APIs set_sched_policy and
get_sched_policy, and the SP_* constants.
Note: debug.sys.noschedgroups is not supported by the C APIs,
this needs to be discussed.
Change-Id: I32bbfc539ef4090faf9ef0320380e8cca9eae07c
This change fixes an issue where we were sometimes setting the SurfaceTexture's
EGLDisplay to EGL_NO_DISPLAY in detachFromContext, and then subsequently
abandoning the texture. Abandoning while in the detached state would result in
the eglDestroyImageKHR calls failing, which resulted in a memory leak.
Bug: 6302694
Change-Id: I24c1de0dac029a83c7508075fb8aaeaed96a14ea
When eglTerminate() is called with a window surface still exists, a
deadlock would occur since egl_display_t::terminate() holds a lock
while destroying the window surface, which calls
onWindowSurfaceDestroyed() which attempts to take the same lock.
This change refactors the hibernation code and data into a separate
object with its own lock, separate from the egl_display_t lock. This
avoids the deadlock and better encapsulates the hibernation logic.
The change also fixes a bug discovered incidentally while debugging:
hibernating after calling eglTerminate() succeeds, but will cause
awakens from subsequent eglInitialize() to fail. We will no longer
hibernate a terminated display.
Change-Id: If55e5bb603d4f8953babc439ffc8d8a60af103d9
This tests if eglTerminate can succeed while objects
are leaked. Currently the test fails because of a deadlock.
Change-Id: Ibe26edfda28691284d0674e803e8d3114f3ce4c6
This change makes SurfaceTexture include an offset for all sides of the crop
region when cropping. This keeps the image centered, to minimize the visual
changes when switching between the texture transform matrix-based cropping and
something that does proper cropping (e.g. HWComposer).
Change-Id: I541d3046fd92e49221b488444df36d490924d1c5
- it returned an empty rect when the region was empty, instead
of returning an empty list of rect.
- also fixed an infinite loop when boolean_operation was given
an empty list of rects
Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
this seems to hurt performance on some GPU. this change
might negatively affect performance on other GPUs though, but
probably in less time-sensitive cases. If this becomes a
problem it might become necessary to pre-clip the geometry
(so that we don't have to use glScissor).
This improves the rotation animation quite a bit.
Change-Id: I5dbe1286f7ad858ef2c1e1ad9a07ee3f26c0b1f3
this optimization didn't improve performance and in fact
seemed to hurt more than anything else. it also made
things a lot more complex as it introduced edges cases
when switching to/from h/w composer.
Change-Id: Iaafc235e175f5740cd98bff914d706e02ab88bb8
SurfaceTexture will modify the crop rect so it matches
the desired output aspect ratio when the scaling
mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test
for this new scaling mode.
Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6