This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.
Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
This change fixes some robustness issues with the
EglDestroySurfaceUnrefsBuffers and
EglDestroySurfaceAfterAbandonUnrefsBuffers tests. The tests previously
depended upon GL implementation details that should not have been relied
upon.
Change-Id: I37fd43b56568efe1dbe69d85e892be8a1cf44d20
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.
Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
This change cleans a few things up in the SurfaceTexture tests:
- Wraps a few long lines.
- Refactors the multithreading portions of SurfaceTextureGLToGLTest into
a new test fixture called SurfaceTextureGLThreadToGLTest.
- Changes some of the tests that were creating their own EGLSurface to
use the SurfaceTextureGLToGLTest fixture.
- Reorders the test functions so that they are immediately below to the
test fixture that they use.
Change-Id: I0491ce3528a7ff2b4f1e83602ba290269c087297
this happens often with CPU Surfaces, which disconnect long
after their surfacetexture has been abandoned.
Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.
this will hopefully resolve some performance issues.
Bug: 5553562, 5631630
Change-Id: I54c7a9e2068586898ab13e405d95534669260537
the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.
To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.
Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
This change fixes an issue involving buffer reallocation and the
ALLOW_DEQUEUE_CURRENT_BUFFER mode in SurfaceTexture. The bug happened
when the buffer slot currently attached to the GL texture was selected
for dequeuing, but the dequeue operation caused the buffer to be
reallocated. Because the buffer is new, the image producer could fill
the buffer and queue it before an updateTexImage call, which would
result in the "slot %d is current" error in queueBuffer.
Bug: 5631630
Change-Id: Icdd8bc5cad3c7db43953446d9be2603aaea11a8d
Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.
It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.
Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.
Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.
This is fixed by checking all the free slots and returning the oldest buffer.
Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.
this will hopefully resolve some performance issues.
Bug: 5553562
Change-Id: I939992b4cd0debea980dec0127c72be2dff33af8
Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in. It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.
Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.
Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
This change removes the mutex from the BlobCache class. The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon. Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods. Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.
Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
On user-debug and eng builds, you can set the
"db.log.slow_query_threshold" system property to queries that
take longer than the specified number of milliseconds.
Set it to 0 to log all queries.
This property has been around for a while but it was implemented
poorly. In particular, it *changed* the behavior of the query
by calling getCount() while holding the Db connection.
In normal operation, the query will not actually run until later.
By putting the timing logic into fillWindow() instead, we ensure
that we only measure queries that actually ran. We also capture
cases where the cursor window gets filled multiple times.
Bug: 5520301
Change-Id: I174f5e1ea15831a1d22a36e9a804d7755f230b38
This fixes the build on Linux when RefBase is compiled with reference tracking
enabled.
Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3
Signed-off-by: Iliyan Malchev <malchev@google.com>
This change adds two tests to ensure that eglDestroySurface does not
cause Gralloc buffers to be leaked.
Bug: 5472838
Change-Id: Id675d74e34b6479f2d68314d40de94aede69f142
This change makes SurfaceTextureClient free its references to all the
buffers even when the disconnect binder call to the SurfaceTexture
fails.
Bug: 5384823
Change-Id: Iad787fbae5fda4769546fd52276e4e4030c62be6
if system process ever restarted, processes using a SensorManager
would loose the ability to use it, resulting to a crash.
we now listen for sensor service death and reconnected if necessary.
Bug: 5445240
Change-Id: Ia47f8b26cdcecb729fa22bf11d55e10fcaef8cfc
This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.
Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
This change fixes the ISurfaceTexture error reporting for the case where
the binder transaction fails.
Bug: 5082219
Change-Id: I6517532992e3a76dc9eb5e4a36af43a562391aaa
There is no difference and has never really been a difference
between local-only and remotable CursorWindows. By removing the
distinction officially in the API, we will make it easier to
implement CrossProcessCursor correctly. CrossProcessCursor
is problematic currently because it's not clear whether a call
to getWindow() will return a local-only window or a remotable window.
As a result, the bulk cursor adaptor has special case handling
for AbstractWindowedCursors vs. ordinary CrossProcessCursors
so that it can set a remotable window before the cursor fills it.
All these problems go away if we just forget about local-only
windows being special in any way.
Change-Id: Ie59f517968e33d0ecb239c3c4f60206495e8f376
This change renames the ScreenshotsOfProtectedBuffersFail to
ScreenshotsOfProtectedBuffersSucceed and changes the test to verify that
the screenshot succeeds.
Change-Id: I960bb8eed4211578cb4dc446b08392937da064b6
This change merges the ISurfaceComposer::setOrientation functionality
into ISurfaceComposer::setTransactionState. It enables the window
manager to atomically update both the display orientation and the
position and size of the windows in a single transaction with
SurfaceFlinger.
Bug: 5439574
Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900