This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class. The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer. This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed. Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.
The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves. This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.
Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
This change makes the SurfaceTexture GL tests use a large (512x512)
framebuffer. The tests now use glViewport to render to a region of the
framebuffer with a size matching that of the texture being drawn. The
Npot test pixel checks must be changed because now the rendered region
is the same size as the texture.
Change-Id: Icc41803189c25e33ba1da7d2470720f0a11f3e4b
This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.
Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.
Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
This change increases the Surface layer used for displaying the test
results so that the tests will be visible over other windows in the
system.
Change-Id: I47f147f8743ff2a39d57d551811668371202bd31
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
This change adds a test to verify that querying the format of a
SurfaceTextureClient immediately after setting it returns the correct
result. The test is currently disabled because it does not pass.
Change-Id: I5bddb39c5bf96d6104624094383d410ed913e9f3
This change disables the UpdateTexImageAfterFrameFinishedWorks test
because it's currently causing deadlocks on some devices.
Change-Id: Ic9186db207e8d656f3af5d86fa138c7d96393c55
This change adds a default tolerance of 2 to all the pixel value checks
in the SurfaceTexture tests.
Change-Id: Id5a7cdffdfae16076e2daf4964a3326105b5ae2c
This change adds some tests to verify streaming images from one GL
thread to another via SurfaceTexture. Currently the tests do not
validate the correctness of the streamed images, but rather simply
verify that this streaming does not cause a deadlock. 3 of the 4 tests
are currently disabled because they do cause deadlocks on some devices.
Change-Id: I5677942053190063b97f370dba96c116711bc3bb
This change adds a test verifying that with no transform set on the
SurfaceTextureClient, the SurfaceTexture will return an identity
transform matrix. It also verifies this same effect in the presence of
an additional call to native_window_set_buffer_count just before the
call to getTransformMatrix.
Bug: 4490420
Change-Id: Ic5adfa29b5696cc2b451433834e3758ef20c5edd
This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called. This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.
Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
pthread_create already includes the necessary memory barriers:
- parent at pthread_create : pthread_mutex_unlock(start_mutex)
- child at __thread_entry : pthread_mutex_lock(start_mutex)
Add lock around uses of mThread.
Added comments:
- uses of mThread require lock
- androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads.
Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
Don't emit tar blocks for directories with an invalid nonzero size. Also, if
such an entry is encountered during restore, don't actually attempt to treat
it as valid and thus skip over the next actual tar entry.
This patch also adds tracking of the data actually consumed during restore,
and reports a total at the end of stream.
Change-Id: I625173f76df3c007e899209101ff2b587841f184
...for Market App iRunner
There were a lot of serious issues with how we updated (or often didn't update)
the display and resource state when switching compatibility mode in conjunction
with restarting and updating application components. This addresses everything
I could find.
Unfortunately it does *not* fix this particular app. I am starting to think this
is just an issue in the app. This change does fix a number of other problems
I could repro, such as switching the compatibility mode of an IME.
Also a few changes here and there to get rid of $#*&^!! debug logs.
Change-Id: Ib15572eac9ec93b4b9966ddcbbc830ce9dec1317
this bug was introduced recently. it caused RefBase's weakref_impl
structure to be leaked for every RefBase object (about 20 bytes).
Change-Id: Id85e749ba04521199555dd701198edd097c313d4
Every available shared-storage volume is backed up, tagged with its
ordinal in the set of mounted shared volumes. This is an approximation
of "internal + the external card". This lets us restore things to the
same volume [or "equivalent" volume, in the case of a cross-model
restore] as they originated on.
Also fixed a bug in the handling of files/dirs with spaces in
their names.
Change-Id: I380019da8d0bb5b3699bd7c11eeff621a88e78c3