• Home
  • History
  • Annotate
  • only in /frameworks/native/libs/gui/
History log of /frameworks/native/libs/gui/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dd3cb84cfbe8068790c6233b5829fae9c4a0ee93 20-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add support for secure displays

This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set. All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
SurfaceComposer.cpp
urfaceComposerClient.cpp
7f79a2bd5c92bc626890dc16ffb8cd2de934e5fb 17-Oct-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: alloc without holding the lock" into jb-mr1-dev
2d5e230292c27d59f4c096bc742a0a19abf811c1 16-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add animation transactions

This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen. SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
urfaceComposerClient.cpp
1efe099a51e2231bd938a6afcf66e6584deec0f2 05-Oct-2012 Jamie Gennis <jgennis@google.com> BufferQueue: alloc without holding the lock

This change makes BufferQueue::dequeueBuffer release its mutex before
allocating new buffers. This should alleviate lock contention in
SurfaceFlinger where SF's main thread can get blocked waiting for an allocation
operation to complete.

Bug: 7335075
Change-Id: I1b000539cc616a695afab2e9c68507db69e57b13
ufferQueue.cpp
2a09bb321930e1f782599ec902bca1db58b9af77 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Add blankDisplay/unblankDisplay to SurfaceComposerClient.

Bug: 7309812
Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
urfaceComposerClient.cpp
9504eb915c9628e130f45019bdefda0168089886 05-Oct-2012 Jesse Hall <jessehall@google.com> Fix race condition in ConsumerBase::addReleaseFence()

This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.

Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
ufferItemConsumer.cpp
onsumerBase.cpp
urfaceTexture.cpp
d920670f252d7984f8729cd578ce8c0befa77273 04-Oct-2012 Stephen Hines <srhines@google.com> Fix missing parens in CleanSpec.mk.

Change-Id: I0440a942d3e685d619ec9cc402d3293cb3f52df1
leanSpec.mk
3fbbd076ad571810d9107ed870cfce2e8c062d10 05-Oct-2012 Raph Levien <raph@google.com> Fix broken CleanSpec.mk in libs/gui

The CleanSpec is missing parens, which causes $P to be interpreted as a
single variable, and the following printed to the log:

Clean step: rm -rf RODUCT_OUT/obj/SHARED_LIBRARIES/libgui_intermediates

This patch adds parens as needed.

Change-Id: I587998fa67a4884418c286360a577cdbb6ea9a21
leanSpec.mk
a573945df7d21cfb73aa9cdba41561105e2ffb01 28-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: enable fence support for exynos5

Change-Id: Iffc48412b8c951116a956a3ac7dab8d75eed13da
Bug: 7238122
ndroid.mk
leanSpec.mk
3fd12e41afcf323fdb99a4cf6bef0f904d72cc8b 03-Oct-2012 Jamie Gennis <jgennis@google.com> libgui: fix up compile options

This change adds debug info to SurfaceFlinger's dumpsys to indicate that the
USE_WAIT_SYNC compile option was enabled, and it removes the
ALLOW_DEQUEUE_CURRENT_BUFFER option.

Bug: 7238122
Change-Id: I70e08e34c2ef58aa6d2f88229e781a119f84b5a9
ndroid.mk
ufferQueue.cpp
uiConfig.cpp
urfaceTexture.cpp
ba607d53c6a94ea8c4c12571980c4ad159af308b 01-Oct-2012 Jesse Hall <jessehall@google.com> Add Fence::waitForever which logs a warning timeout, and use it

Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
ufferItemConsumer.cpp
puConsumer.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
c01a79d77b829e7de86ef137694e8ad708470ca1 28-Sep-2012 Andy McFadden <fadden@android.com> Pass display arg to blank/unblank

This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).

Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
SurfaceComposer.cpp
38b657265ccc5ae45bd7860a68b0d9373b47a2f3 28-Sep-2012 Iliyan Malchev <malchev@google.com> Revert "Compatibility work around for bad graphics driver dependency."

This reverts commit a50b51c03aca449920fc8581a738032a7bce7150

Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
urfaceComposerClient.cpp
4803b74e2a12a508f7bbfde6f6a962fe3299c61c 25-Sep-2012 Andy McFadden <fadden@android.com> Show build config in dumpsys SurfaceFlinger

This adds a line to the "dumpsys SurfaceFlinger" output that shows
build-time configuration values.

Example:
Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \
[libgui USE_FENCE_SYNC]

Bug 7206633

Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
ndroid.mk
uiConfig.cpp
e96e9e1093b5700e9f403a6e2479da7dc36d3b71 25-Sep-2012 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture's setFilteringEnabled

bug: 7211067
Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c
urfaceTexture.cpp
7aff4a5de47bf32b0934f5744cd1df4ce666d2d2 24-Sep-2012 Jamie Gennis <jgennis@google.com> ConsumerBase: make fence names meaningful

Change-Id: I3580120cb63c027c327e80ec70e68650b75395de
onsumerBase.cpp
d1b330de416adff0d178a5cb7271419d9ed7a89a 21-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix an out of bounds array write

This change fixes an issue causing the mEglContext member of a SurfaceTexture
to get incorrectly zeroed out. This would happen when a call to
ConsumerBase::releaseBufferLocked resulted in the current buffer being freed.
Freeing the current buffer would set SurfaceTexture::mCurrentTexture to -1,
which would then be used by SurfaceTexture::releaseBufferLocked to reset the
current slot's EGLSyncKHR to EGL_NO_SYNC_KHR (= 0). This would overwrite the
mEglContext field, resulting in context mismatch errors in
SurfaceTexture::doGLFenceWaitLocked.

The fix is to simply use the buffer slot that's passed in to
SurfaceTexture::releaseBufferLocked rather than mCurrentTexture.

Change-Id: I0e5e2bd88fcbb354c35a3744f317716fff3e0e41
urfaceTexture.cpp
42223f6fdd582dc4e87ad94c212adaed3341f154 10-Sep-2012 Jeff Boody <jboody@codeaurora.org> gui: conditionally set USE_NATIVE_FENCE_SYNC for msm8960

Change-Id: Ib7ad11597ef7c79162a0b0a49a1b8ae16d192c10
Signed-off-by: Iliyan Malchev <malchev@google.com>
ndroid.mk
leanSpec.mk
3941cb240d438bfdebe24920bb2ada86456a0bf9 18-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: default to doing GL sync

This change makes updateTexImage default to performing the necessary
synchronization and adds an argument for SurfaceFlinger to disable that
synchronization so that it can be performed lazily.

Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d
Bug: 6991805
urfaceTexture.cpp
8dfa92fef9759a881e96ee58d59875d35023aab9 18-Sep-2012 Andy McFadden <fadden@android.com> Plumb display name into SurfaceFlinger

The Surface createDisplay() call takes a display name for debugging.
This change carries it through SurfaceFlinger and displays it in
the "dumpsys SurfaceFlinger" output.

Bug 7058158

Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
SurfaceComposer.cpp
urfaceComposerClient.cpp
71f683ac8d28e93928a9bb1744f43264b4846e8f 15-Sep-2012 Andy McFadden <fadden@android.com> New test

Added a test to confirm that the transform hint is being respected.

Bug: 7162482
Change-Id: I892fe962f8cf2759ff951b4f5065b9ac2732c3d1
ests/SurfaceTexture_test.cpp
6905205c8d130b6ea3a813c1b9283492ed183367 15-Sep-2012 Andy McFadden <fadden@android.com> Fix transform hints

The hints were being set a little too late, so the pre-rotation stuff
wasn't quite working.

Bug 7054997

Change-Id: Id8d5c626db7a76f768ba762a145b315878ee08e6
ufferQueue.cpp
c272430960047de4e9b2f169fb053bd0aedce3b1 12-Sep-2012 Andy McFadden <fadden@android.com> Merge "Watch for SurfaceFlinger death" into jb-mr1-dev
98ff0597bd9e57ba133d54f8f09841f96955cba1 10-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: eglDestroySync after duping its fd

This change adds a call to eglDestroySync after we've dup'd the fd for the
Android fence that the EGLSyncKHR object wraps.

Change-Id: I4fa6ece863260793630d70bb9a69d6284d05d99e
urfaceTexture.cpp
61e04b92bdeafc6fca89052d14dab1bd0c384a71 10-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: use eglWaitSync

This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written. It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
urfaceTexture.cpp
01dbf5539bff4bece3f9bbfa55046b04a8a45e99 06-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: use EGL-created native fences

This change adds support for using Android fences that come from EGLSyncKHR
objects as the release fence for a buffer.

Change-Id: Ice192ce2ec001020f909a2018afdf0f17b24dec9
urfaceTexture.cpp
6652b3edcb7ef5402c05db12f477ceb23c27d6ec 07-Sep-2012 Andy McFadden <fadden@android.com> Watch for SurfaceFlinger death

The ComposerService object wasn't watching for SurfaceFlinger
restarts, which doesn't usually matter because the app framework
restarts when SurfaceFlinger dies. However, mediaserver continues
to run, which means its ComposerService object was trying to use
a dead handle, and playback of DRM movies was failing.

This adds a DeathRecipient listener and some logic to re-establish
the SurfaceFlinger connection.

Bug 6645813

Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
urfaceComposerClient.cpp
b27254154642575dfb4bbfa79fbedde7d7ee23dd 06-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: move fence handling into ConsumerBase

This change moves some common fence handling code into the base class for
BufferQueue consumer classes. It also makes the ConsumerBase class initialize
a buffer slot's fence with the acquire fence every time a buffer is acquired.

Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
ufferItemConsumer.cpp
onsumerBase.cpp
puConsumer.cpp
urfaceTexture.cpp
00e8c7a88a5b9c4104a71013a713acd3e4d3b77b 05-Sep-2012 Mathias Agopian <mathias@google.com> display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
urfaceComposerClient.cpp
c68f2ecfa02037144d1a3856f637a77f523cf416 31-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: add a setMaxAcquiredBufferCount check

This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
ufferQueue.cpp
ests/BufferQueue_test.cpp
9e75ddda93888755d0b14144b62e896cd9f78f3a 01-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: add BufferQueue test infrastructure

This change adds some infrastructure for testing the BufferQueue class. It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.

Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
ests/Android.mk
ests/BufferQueue_test.cpp
fdb6b49dfa9f1f71b2e564c9f423043f90f9346c 31-Aug-2012 Jamie Gennis <jgennis@google.com> libgui: disable CpuConsumer tests

This change disables the CpuConsumer tests because they require a Gralloc
format that is not supported on all devices.

Change-Id: Ifaa618062c1dae53d9fcb9e16ba92c480d3dbd0c
ests/CpuConsumer_test.cpp
4697528eac85d34b2b375ece1d4b40aebe3fa5dd 31-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a few tests

Change-Id: Ic74fe8791361f8fe91ad7149720fafd4cc154ac1
ests/SurfaceTextureClient_test.cpp
ests/SurfaceTexture_test.cpp
d69097f936d9780957a51ce77335ae409b32aaa3 30-Aug-2012 Jamie Gennis <jgennis@google.com> libgui: add some error checks

This change adds a few error checks both in the framework and in some tests.

Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
GraphicBufferAlloc.cpp
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
5e5efde7874a9fab650fd4b724ceef46db850470 29-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: add a check for the max acquired bufs

This change adds an error check to ensure that consumers don't acquire more
buffers than the maximum that they set.

Change-Id: I026643564bde52732e4ee6146972b207ddbbba77
ufferQueue.cpp
72f096fb1ad0a0deadbfac5f88627461905d38e8 28-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: use max acquired buffer count

This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer. This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.

Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
ufferItemConsumer.cpp
ufferQueue.cpp
puConsumer.cpp
1847f7fd799f92300b3786e49f5883eaa03f4507 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-dev
2b9776982360a234803665cb79e8abcfeb0e3c79 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev
94f261556cc5f4aa628cd5b71bf923b583f6e3c3 30-Aug-2012 Wink Saville <wink@google.com> Revert "A vendor ril depends on a native screen shot code."

This reverts commit 9b5782baf0a8a2d7afc7129453beb5df7abe7650.

A new ril for toro, hack no longer needed.
urfaceComposerClient.cpp
e191e6c34829aec406a9cfe3e95211f884a311ff 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: simplify max buffer count handling

This change reworks how the maximum buffer count is computed.

Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
ufferQueue.cpp
31a353da225af5329735451c761b430d82dfda1b 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: clean up buffer counting

This change is a clean up of some of the handling of the maximum number of
buffers that are allowed at once. It mostly renames a few member variables and
methods, but it includes a couple small refactorings.

Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
ufferQueue.cpp
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
9b5782baf0a8a2d7afc7129453beb5df7abe7650 29-Aug-2012 Wink Saville <wink@google.com> A vendor ril depends on a native screen shot code.

Add a temporary shim until the vendor fixes the ril.

Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
urfaceComposerClient.cpp
a50b51c03aca449920fc8581a738032a7bce7150 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Compatibility work around for bad graphics driver dependency.

This is a compatibility shim for one product whose drivers
are depending on SurfaceComposerClient::getDisplayInfo(
int, DisplayInfo*) when it really shouldn't.

Revert this patch when the problem has been resolved.

Bug: 7065398
Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
urfaceComposerClient.cpp
380223bf1b340e7503177254a60d5982f95ab793 27-Aug-2012 Jeff Brown <jeffbrown@google.com> Remove unused "layer" argument from show().

Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
urface.cpp
urfaceComposerClient.cpp
9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Banish DisplayID from the SurfaceFlinger API.

Use only display tokens in the API to refer to new displays.

Don't require the caller to specify the display when creating
a surface (since in general a surface could be shown on
any display).

This is intended to be a minimum change just to update the API.
Note that SurfaceFlinger still uses DisplayID in a few places
internally that might cause some features not to work properly
when there are multiple displays (LayerScreenshot, for example).

Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
SurfaceComposer.cpp
SurfaceComposerClient.cpp
urface.cpp
urfaceComposerClient.cpp
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
490aee0fc5012acf2bf0b1dfe9c09e6fcca606fc 24-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: inherit from ConsumerBase (try 2)" into jb-mr1-dev
04930445031c5f41707806182bb7a152e64ddede 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Add BufferItemConsumer, a simple BufferQueue consumer." into jb-mr1-dev
9fea3421ffddf6480f57f55a25936a886043d909 08-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: inherit from ConsumerBase (try 2)

This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.
This includes fixes for two bugs that were found after checking this change in
the first time and then reverting it.

Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
onsumerBase.cpp
urfaceTexture.cpp
e232fdca2a62dc5e81b550f5be8710e36174e7a6 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Add BufferItemConsumer, a simple BufferQueue consumer.

BufferItemConsumer allows for acquiring BufferQueue's BufferItems,
which contain all the data and metadata the BufferQueue has for a
given graphics buffer.

This consumer is useful when direct access to the native buffer_handles
is needed by the client.

Also includes a minor cleanup of CpuConsumer's use of 'virtual'.

Bug: 6243944
Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
ndroid.mk
ufferItemConsumer.cpp
puConsumer.cpp
84a9a3c0ec35915d3cc40e9e889d4032e189894a 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "CpuConsumer: inherit from ConsumerBase" into jb-mr1-dev
f57e7540d4cf799f18fe87d3536c55f1e0064931 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: inherit from ConsumerBase

Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
puConsumer.cpp
729f48082e2c7660e94830e52006f7af4efb747a 20-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "SurfaceTexture: inherit from ConsumerBase"" into jb-mr1-dev
f7f6345068fe0644bf296b88a687b361eae0cc98 20-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"" into jb-mr1-dev
ce7a6c0fc9d75b80da030d1790321e84475f956a 20-Aug-2012 Jamie Gennis <jgennis@google.com> Revert "SurfaceTexture: inherit from ConsumerBase"

This reverts commit ed059a8d754770c3cf28b78dba30f7a6ba475dbe

Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
onsumerBase.cpp
urfaceTexture.cpp
483bccd0d9f7e5e7aa452e9e3e53056387f4b25c 20-Aug-2012 Jamie Gennis <jgennis@google.com> Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"

This reverts commit f8d33c652b930abbfb0722f3a2928cbc2ea71078

Change-Id: I1ff2e1cc85824a8fac1051f573d2931db81af511
urfaceTexture.cpp
220ef10c5fe44df0ff3898de06028975995a34e4 20-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: call ConsumerBase::freeBufferLocked" into jb-mr1-dev
f8d33c652b930abbfb0722f3a2928cbc2ea71078 20-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: call ConsumerBase::freeBufferLocked

This change fixes SurfaceTexture::freeBufferLocked so that it calls the base
class implementation.

Change-Id: I45d76fb2eb02c1fa6e4e917823ead83e2086bd15
urfaceTexture.cpp
d3bbcaff6f0e08db0412d92f42562a2826a58bec 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 21938749 to jb-mr1-dev

Change-Id: I17da10797736f3772a143e2015fe25df0bb3eb3f
2c7eb92b6394427bfe81962668d46194959bc722 18-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: inherit from ConsumerBase" into jb-mr1-dev
818b46058aa3006e1d3c178abd36d4f10823f5d9 17-Aug-2012 Mathias Agopian <mathias@google.com> display states can't share the dirty flags

Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
urfaceComposerClient.cpp
ed059a8d754770c3cf28b78dba30f7a6ba475dbe 08-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: inherit from ConsumerBase

This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.

Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
onsumerBase.cpp
urfaceTexture.cpp
8683fca395d01734ec7946e9f0595ec5d7b754c6 13-Aug-2012 Mathias Agopian <mathias@google.com> improve [un]marshalling of non-binder objects

this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
SensorServer.cpp
ayerState.cpp
ensor.cpp
e57f292595bec48f65c8088b00ff6beea01217e9 10-Aug-2012 Mathias Agopian <mathias@google.com> make multi-display more real

- displays are represented by a binder on the client side
- c++ clients can now create and modify displays

Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
SurfaceComposer.cpp
ayerState.cpp
urfaceComposerClient.cpp
3165cc21cfea781988407b19bd83292b19f05f55 09-Aug-2012 Mathias Agopian <mathias@google.com> libgui includes refactoring

Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
urfaceComposerClient.cpp
3d1d09c0c116c42f7d083f87628b5f8377b1f275 09-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: Fix a fence fd leak.

Bug: 6949010
Change-Id: I289992c964504b4fe5458dbd19b248a841ef043f
urfaceTexture.cpp
45cb2ba1d52d81e20702b62610422fb09aaedeae 07-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix an out of bounds array access

Bug: 6879028
Change-Id: Ic3d35a9384c0a6dfa4000e7743a6f6859608b0bf
urfaceTexture.cpp
1a4d883dcc1725892bfb5c28dec255a233186524 03-Aug-2012 Jamie Gennis <jgennis@google.com> surfaceflinger: refactor FrambufferSurface

This change refactors the FramebufferSurface class to inherit from the new
ConsumerBase class.

Bug: 6620200
Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
ndroid.mk
ufferQueue.cpp
onsumerBase.cpp
72131d9ef13ffaf3af4ca2fe700426b82baac9fa 05-Aug-2012 Mathias Agopian <mathias@google.com> remove unneeded dependencies in libhardware

Change-Id: Ibb8d698d594216d0746b0e7270cf87d7e5acab2b
ndroid.mk
urfaceTexture.cpp
92efd84f37ce5a8aae74dc9086f825a67b6894e9 03-Aug-2012 Mathias Agopian <mathias@google.com> screen-off animation won't be handled by SF anymore

Change-Id: Idc41386804ae7d7eb981c36e1bc55c270870c8d0
SurfaceComposer.cpp
4f9c284de4b9159126f69eb1219c410f66cc872c 02-Aug-2012 Romain Guy <romainguy@google.com> Add missing break in switch statement

Change-Id: I6206cc9ca46c4e2f125d3d820256280586ad66a1
urfaceTexture.cpp
12bd497f280a69ae5fe7694ae3146008cacc0eb6 31-Jul-2012 Jamie Gennis <jgennis@google.com> libgui: enable EGL_fence_sync usage for exynos5

Bug: 6876502
Change-Id: I2ec2800881dcba9e4f6ff32ffa1341a2de01f0a2
ndroid.mk
c666cae2d5995097ec49a87e375e2afdd92802b7 26-Jul-2012 Mathias Agopian <mathias@google.com> get rid of the shared-memory control block

Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
SurfaceComposer.cpp
urfaceComposerClient.cpp
8785578391eacd4192333d7b0ce3afedd7d163e6 25-Jul-2012 Mathias Agopian <mathias@google.com> add a layerStack attribute to Layers.

this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)

Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
urfaceComposerClient.cpp
8b33f032327f8de0dcc0e6d0d43ed80f834b51f6 25-Jul-2012 Mathias Agopian <mathias@google.com> update SF binder protocol to support setting display attributes

no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
SurfaceComposer.cpp
ayerState.cpp
urfaceComposerClient.cpp
6501e9944df131b3b7e293007084735dfa217f24 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
urface.cpp
urfaceComposerClient.cpp
f9176a93a5c9061fe001c91bca50dd0a58d54f10 16-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freezeDisplay(), which is no-op.

Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21
urfaceComposerClient.cpp
47ad361cee48a026c8c3695da04aab75e1e7b925 10-Jul-2012 Steve Critchlow <steve.critchlow@sonymobile.com> Fix error trap in SurfaceTexture Client

There was an issue in Surface::lock where failure to lock a surface
resulted in two bad things happening:
- success was returned to the caller (it was apparently locked).
- an uninitialised pointer was returned as the buffer.

Change-Id: I8b0df81400e0fa0542a8bb993d76923ac96b686e
urfaceTextureClient.cpp
e7db724bed5d1e5086801df7705d9b1f2a071785 03-Jul-2012 Jesse Hall <jessehall@google.com> Fix check for fence merge success

Change-Id: I9b16526ebfe4ffabf7c4372cca9b192ce046aa21
urfaceTexture.cpp
dc5b485f74edf2d2f31c62054eb6c180421a3ade 30-Jun-2012 Jesse Hall <jessehall@google.com> Pass fence to HWC on first use of buffer

Also do a CPU-wait on the fence before using it for GL composition.

Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
urfaceTexture.cpp
b42b1ac1587aebda5e2f334d95b620271fafba4e 28-Jun-2012 Jesse Hall <jessehall@google.com> Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
ufferQueue.cpp
puConsumer.cpp
urfaceTexture.cpp
c777b0b3b9b0ea5d8e378fccde6935765e28e329 28-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences with buffers from SurfaceTextureClient

Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
ufferQueue.cpp
SurfaceTexture.cpp
urfaceTextureClient.cpp
02a7be74dd0c4eb47a522cb0f646736cb6d0de01 29-Jun-2012 Jesse Hall <jessehall@google.com> Merge "Clarify aborted updateTexImage use of fences"
962174da0303d94180af7648faf90e112b851192 29-Jun-2012 Jesse Hall <jessehall@google.com> Merge "Return fence to client in dequeuBuffer"
d58c304cc60be46a363fdcdce6da06e4ecb589b6 29-Jun-2012 Jesse Hall <jessehall@google.com> Clarify aborted updateTexImage use of fences

When updateTexImage acquires a buffer but then aborts (due to an error
or the buffer being rejected), it releases the newly-acquired buffer.
It was passing the buffer slot's fences to releaseBuffer, even though
they hadn't been created after the acquire yet. This wasn't a bug,
since the fences would be cleared just after the buffer slot was last
released, but explicitly passing null fences makes this clearer.

Change-Id: I087f2ec3fd02c40f57782c1fca24eb9567e2943d
urfaceTexture.cpp
f9783af225aa3b41ec0af36f90941a714269abb7 25-Jun-2012 Jesse Hall <jessehall@google.com> Return fence to client in dequeuBuffer

Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
urfaceTextureClient.cpp
3094df359d1e6e2ae8ca4e935cc093f563804c96 19-Jun-2012 Mathias Agopian <mathias@google.com> First prototype atttempting to support an external display

both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
SurfaceComposer.cpp
f78575400977f644cf0b12beb2fa5fc278b6ed4c 15-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences from BufferQueue to SurfaceTextureClient

ISurfaceTexture::dequeueBuffer now returns the buffer's fence for the
client to wait on. For BufferQueue, this means passing it through
Binder so it can be returned to the SurfaceTextureClient. Now
SurfaceTextureClient is responsible for waiting on the fence in
dequeueBuffer instead of BufferQueue: one step closer to the goal.

Change-Id: I677ae758bcd23acee2d784b8cec11b32cccc196d
ufferQueue.cpp
SurfaceTexture.cpp
urfaceTextureClient.cpp
ef19414bd8b77a26f5751f3845be79025a8263fe 14-Jun-2012 Jesse Hall <jessehall@google.com> Transfer HWC release fences to BufferQueue

After a HWC set, each SurfaceFlinger Layer retrieves the release fence
HWC returned and gives it to the layer's SurfaceTexture. The
SurfaceTexture accumulates the fences into a merged fence until the
next updateTexImage, then passes the merged fence to the BufferQueue
in releaseBuffer.

In a follow-on change, BufferQueue will return the fence along with
the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the
fence to signal before returning.

The releaseFence default value for BufferQueue::releaseBuffer() is
temporary to avoid transient build breaks with a multi-project
checkin. It'll disappear in the next change.

Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
ndroid.mk
ufferQueue.cpp
puConsumer.cpp
urfaceTexture.cpp
d8e812ce6fe9ae0388e98b08456e1d18b9498239 14-Jun-2012 Jamie Gennis <jgennis@google.com> Update ANativeWindow clients for sync

This change updates the uses of ANativeWindow to use the new ANW functions that
accept and return Sync HAL fence file descriptors.

Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
urfaceTextureClient.cpp
ests/Android.mk
ests/CpuConsumer_test.cpp
ests/SurfaceTextureClient_test.cpp
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
3e87601170141229d661df93e2f59e1ced73474b 08-Jun-2012 Mathias Agopian <mathias@google.com> Implement SurfaceFlinger's ANW on top of BufferQueue

SF now has its own implementation of ANW for the
framebuffer and it uses BufferQueue. FramebufferNativeWindow
is now only used by stand-alone apps.

Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
ufferQueue.cpp
8e533069e5721e55cb9768e140e16546c3a4a8b6 07-Jun-2012 Colin Cross <ccross@android.com> surfaceflinger: replace early suspend with binder call from PowerManager

SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
SurfaceComposer.cpp
2466e402a054669ecda0d2b0dcb9cc08c4a9559a 30-May-2012 Mathias Agopian <mathias@google.com> am 584fcb32: am 2c8207e9: add the ability to reject buffers in SurfaceTexture::updateTexImage

* commit '584fcb3218e07d7b4cc0aeaef41faa4e891b45a4':
add the ability to reject buffers in SurfaceTexture::updateTexImage
2c8207e9627fe6c7a90e31fae8d71ae49df56845 24-May-2012 Mathias Agopian <mathias@google.com> add the ability to reject buffers in SurfaceTexture::updateTexImage

SurfaceFlinger is using this new feature to reject buffers that
don't have the right size.

Bug: 6498869
Change-Id: I8a7250a47db6c082a357b703feb3b9d0fc8d3443
urfaceTexture.cpp
c20bd43b8a376e40e82b398561739f1074196b13 23-May-2012 Jesse Hall <jessehall@google.com> am 138a8d75: am e1082496: Enable SurfaceTexture fence sync for the emulator

* commit '138a8d7510e6ba8a402ffacc38c7cc5bfaa5e571':
Enable SurfaceTexture fence sync for the emulator
e10824965c64663b8878b808206ee382c7ab6af8 21-May-2012 Jesse Hall <jessehall@google.com> Enable SurfaceTexture fence sync for the emulator

The host-accelerated GL ES driver doesn't do the implicit
synchronization required when fence sync isn't used.

Bug: 6515813
Change-Id: I6a667f2db6b519f3557b5abda78775f767841dae
ndroid.mk
69df645759da5c2be94a04d999b3161a307d2107 21-May-2012 Mathias Agopian <mathias@google.com> am 83f1d839: am 7e477bfe: make sure BufferQueue releases newly acquired buffers on failures

* commit '83f1d83975345bada9886e9ea0ef2b950d90cd77':
make sure BufferQueue releases newly acquired buffers on failures
49b97c857e699c36e1e8c6e448da1cc4df572225 21-May-2012 Mathias Agopian <mathias@google.com> am ac4a4825: am f899e411: Remove misleading and wrong ALOGW

* commit 'ac4a48251180a79ae19e3a7112537c3d0fa260c6':
Remove misleading and wrong ALOGW
f336014c8dd20223388dc7e00875b4fd5aebdcdd 21-May-2012 Jesse Hall <jessehall@google.com> am bd56aabb: am 515f19da: Merge "Recreate EGLImage for previously used slots" into jb-dev

* commit 'bd56aabb92097546073c8dd8949bb03161e72c56':
Recreate EGLImage for previously used slots
7e477bfe11f8bb31622353b64e85721df3cf9702 19-May-2012 Mathias Agopian <mathias@google.com> make sure BufferQueue releases newly acquired buffers on failures

this prevents SurfaceTexture producer to hang in dequeueBuffer()
when something goes wrong in the consumer.
only the consumer gets an error and the current frame is kept
instead of the new one. the producer is unaware of the problem.

Bug: 6476587
Change-Id: Ie6db5526632aabc3e60229b93dfe29c19491ade4
urfaceTexture.cpp
f899e4113a5b5545cd91b4625514d0ab0d33751c 19-May-2012 Mathias Agopian <mathias@google.com> Remove misleading and wrong ALOGW

Bug: 6476587
Change-Id: I4345f1100db02786bb50ad83ca7b559cad301706
ufferQueue.cpp
90ed8508ed89b4fdb5c21d621b29369d31dcb958 17-May-2012 Jesse Hall <jessehall@google.com> Recreate EGLImage for previously used slots

SurfaceTexture would only create an EGLImage for a buffer slot when
BufferQueue returns a GraphicBuffer, i.e. either the slot was acquired
for the first time ever, or the buffer for the slot was reallocated.
But the EGLImage may also need to be re-created for a
previously-acquired buffer if the slot's EGLImage was destroyed during
detachFromContext(); in this case BufferQueue won't return a
GraphicBuffer since SurfaceTexture already has a reference to the
correct buffer.

Bug: 6461693
Change-Id: Ib95d0d757192efe336c5fda0866f857481a6617d
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
a74eb25cbc42a9dde0df6b2303fda9027f77f393 15-May-2012 Jamie Gennis <jgennis@google.com> am dd739965: Merge changes I32fbc2b6,Ifd0ed05b into jb-dev

* commit 'dd73996552938ac5165a35f09d389abedcf421ef':
SurfaceFlinger: recompute visible regions less
libgui: remove setPostTransformCrop
e41b318bc4708e1dee9364e73215ff0d51fb76a1 17-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Add a BufferQueue CPU consumer.

Aimed for use cases where gralloc buffers need to be consumed by CPU
users, such as camera image data streams.

The CpuConsumer is a synchronous queue, which exposes raw pointers to
the underlying graphics buffers to applications. Multiple buffers may
be acquired at once, up to the limit set at time of construction.

Change-Id: If1d99f12471438e95a69696e40685948778055fd
ndroid.mk
puConsumer.cpp
ests/Android.mk
ests/CpuConsumer_test.cpp
b7a6b96301c00c630610df4cb55a45d666200817 14-May-2012 Jamie Gennis <jgennis@google.com> libgui: remove setPostTransformCrop

This change removes the setPostTransformCrop function from
SurfaceTextureClient. It also includes a small logging fix in BufferQueue.

Bug: 6299171
Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
ufferQueue.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
f15a83f5814219c167f87cb8aaea622fc8493499 11-May-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add a crop to the layer state

This change adds a crop rectangle specified in window coordinates to the layer
state. The all window pixels outside this crop rectangle are treated as though
they were fully transparent. This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
urface.cpp
urfaceComposerClient.cpp
cd1806e210f2633423f0fb14d39fa00d03974223 10-May-2012 Jamie Gennis <jgennis@google.com> libgui: improve some logging and dumping

This change updates some of the SurfaceTextureClient and BufferQueue logging
and dumping to include the crop, transform and scaling mode. It also removes
the uses of the NO_SCALE_CROP scaling mode enum, which was added by accident in
a previous change.

Change-Id: I62912716a1e48885fb22f12b92678aa13f10fcd9
Bug: 6470541
ufferQueue.cpp
urfaceTextureClient.cpp
82c53806ada5c314124431ec0a49fa15a6b5f1d6 09-May-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: improve texture matrix computation" into jb-dev
cae7c0b955efba6986d9e1fe5a68e48e7a2f806b 09-May-2012 Jamie Gennis <jgennis@google.com> Merge "libgui: Add support for post-xform crops." into jb-dev
5c1139fea3cc0fd9847a6594d853a458152b2fbc 09-May-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: improve texture matrix computation

This change reduces the shrinking of the crop rectangle in some cases. It adds
a way to inform the SurfaceTexture that its texture will be used without
bilinear interpolation, and uses knowledge of the pixel format to avoid
shrinking unecessarily.

Change-Id: I72365f39f74ecb7fcc51b4cf42f2d0fa97727212
urfaceTexture.cpp
d72f233ffa125856a44976a50a66ceb669f49ab2 07-May-2012 Jamie Gennis <jgennis@google.com> libgui: Add support for post-xform crops.

This change adds support for specifying a crop rectangle to a
SurfaceTextureClient that is in post-transformed coordinate space.

Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d
Bug: 6299171
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
ests/SurfaceTexture_test.cpp
29267fe8495a74893dfce1bd9eceb6448df7abea 08-May-2012 Mathias Agopian <mathias@google.com> return errors properly in BitTube and SensorEventQueue

Change-Id: Idf31179f9fcc666e287c7b01b2007431cb60127d
itTube.cpp
ensorEventQueue.cpp
2ebc4d6d947ef488198b8777d9190c93904b4b9a 05-May-2012 Mathias Agopian <mathias@google.com> set a Sensor's version properly

Bug: 6447433
Change-Id: Iaa5d074a8137d9543ea78c2c6f63a750774b3057
ensor.cpp
5c8a608497f12ecea4d6e8f1f286baf57c161ea3 02-May-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a memory leak

This change fixes a memory leak.

Bug: 6414806
Change-Id: I43536689b4219a042749aec2096a1d5c4e664ae3
urfaceTexture.cpp
efc7ab6dcea8c22ddd7c0259ef4ab4bbf1e93044 18-Apr-2012 Jamie Gennis <jgennis@google.com> libgui: Add plumbing for active rectangle

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
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTexture_test.cpp
f4b322801d872b64f6c7dd2d2ffc1e4f8e993eef 19-Apr-2012 Daniel Lam <dalam@google.com> SurfaceTexture: detachFromContext fixed

Fixed AttachToContextSucceeds test SurfaceTexture test by
not deleting the current texture when cleaning up memory.

Bug: 6363186
Change-Id: Ib886bfe6bb86e25ea4825d18b5008afba6b33eae
urfaceTexture.cpp
2488b20aec097accb20a853d9876bb0a5dc04636 21-Apr-2012 Mathias Agopian <mathias@google.com> add a way to query whether an ANativeWindow consumer is running ahead of the producer

Change-Id: Ibccfa1feb56db2ab11f0c0934ce2d570a2b65ae2
ufferQueue.cpp
urfaceTextureClient.cpp
24202f5676c32edeef6544cf36e06b9fc970dbde 23-Apr-2012 Mathias Agopian <mathias@google.com> update the binder protocol for connect to match that of queueBuffer

indeed, connect and queueBuffer return the same data, so it's
easier to have them use the same protocol.

Change-Id: I4f9fa3be0a80c9ab0a7a4039b282ae843aab02e1
ufferQueue.cpp
SurfaceTexture.cpp
urfaceTextureClient.cpp
a0db308c3d62301ae41b2e2bcf295c4ee4c7b08e 23-Apr-2012 Mathias Agopian <mathias@google.com> remove SurfaceTexture::connect()

use BufferQueue::connect() instead

Change-Id: I04aab7cf11304bf962cde38470747f3b19ddba42
urfaceTexture.cpp
6c47034f5ec30041c54d8f0479b01bce566440df 18-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Fix BufferQueue verbose log

Change-Id: Id80742b5c1fd2960cc2eda3a9ba2db1078df5320
ufferQueue.cpp
85b217668d6840c8e6a109adfb99461313676f8d 14-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Remove fixed USAGE_HW_TEXTURE flag from BufferQueue.

USAGE_HW_TEXTURE applies to SurfaceTexture, not to all uses of
BufferQueue. Refactor accordingly.

Change-Id: Ic7add5e1f2bbec3d3e796ba7f15eaa0633945d8f
ufferQueue.cpp
urfaceTexture.cpp
9aa74dbc7070aa396bc425ea3feae3d26e5393f6 17-Apr-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a memory leak

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
urfaceTexture.cpp
2efa4b2bb0128cd65ea8ade46f46bacaf72c194f 18-Apr-2012 Jamie Gennis <jgennis@google.com> Merge changes Id79430f9,I541d3046

* changes:
BufferQueue: check before tracing buffer index
SurfaceTexture: shrink all sides when cropping
695e331f01b136155b1559b3c878b7c5bb631bc1 17-Apr-2012 Jamie Gennis <jgennis@google.com> BufferQueue: check before tracing buffer index

This change adds a check on ATRACE_ENABLED before calling snprintf to trace the
buffer index.

Change-Id: Id79430f9c69706393efd3d10780a4cc97055e9e0
ufferQueue.cpp
91a6826d6794c19cdedfa58c42f8820c5cf5fe2b 16-Apr-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: shrink all sides when cropping

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
urfaceTexture.cpp
ests/SurfaceTextureClient_test.cpp
82ca93bf66e50dcae6f96dc78e88ff24df2b4f32 17-Apr-2012 Mathias Agopian <mathias@google.com> Merge "s/w rendered apps can now use n-buffering (n>2)"
172a62a224967beee9e35e02a5b2fb2705dd2cc0 16-Apr-2012 Mathias Agopian <mathias@google.com> make sure to pass the transform-hint on ANW.connect

this optimization was probably lost during ST refactoring.

Change-Id: I845978c4b718cb91941d15b30484837f19714abe
ufferQueue.cpp
ac6035a12aec38eeb14d0c13636ec980066d9a8f 13-Apr-2012 Mathias Agopian <mathias@google.com> s/w rendered apps can now use n-buffering (n>2)

Bug: 6311881
Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
urfaceTextureClient.cpp
b364be8e55a2ce0b0480e237cb9aac30bd215585 13-Apr-2012 Mathias Agopian <mathias@google.com> fix a typo causing pre-rotation to never work

Change-Id: I8d698ec52d53ef1a553b887c7329413e1f49cc72
ufferQueue.cpp
016c8cbce4dde21f2703b9865f52d16b8d5d5ae2 04-Apr-2012 Daniel Lam <dalam@google.com> Enabled cropping support in SurfaceTexture

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
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTexture_test.cpp
a96b6bdea3d5ece7b1f3bcae40e9fe632ebc8f22 12-Apr-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: work around a compiler bug

This change works around a compiler bug with the GCC 4.6 toolchain.

Bug: 6292211
Change-Id: I004c4750d92a29f193a37d8e605a28fdc3b7f076
ests/SurfaceTexture_test.cpp
c2c380259b2a3fbe7cee1dbd3f2e1e23e9ffd5da 12-Apr-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a test for user sizes & prerotation

This change adds 3 tests for:
- User-overridden buffer size
- Transform hint
- User-overridden buffer size with transform hint

Change-Id: Ib15ea354685e436822c506099613b2bffa7b68c9
ests/SurfaceTexture_test.cpp
55a701459de964ae3504264a6b8c4dc37f54a9e8 10-Apr-2012 Michael I. Gold <gold@nvidia.com> SurfaceTextureClient: support for application buffer dimensions

Add a new API native_window_set_buffers_user_dimensions to allow native
applications to override the native window size for the default buffer size.
This has lower precedence than the existing
native_window_set_buffers_dimensions and allows the two to co-exist.

Change-Id: Ie73590e1c94ef0dadbce500bd0941dfabbcace3c
urfaceTextureClient.cpp
f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246 10-Apr-2012 Mathias Agopian <mathias@google.com> use in/out structures for queueBuffer() IPC

Change-Id: Ie125df2444b62a9a2200586a717dca268852afc9
ufferQueue.cpp
SurfaceTexture.cpp
urfaceTextureClient.cpp
fbcda930dd8b2823cfeb160fd0131f5897b7522f 10-Apr-2012 Daniel Lam <dalam@google.com> BufferQueue returns proper code on acquire

Also removed unnecessary debug messages from
SurfaceTextureClient.

Change-Id: I291897a44170142f9d42a007b008823fad4683e0
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
abe61bfda4938abd932465e27c29ba9e41aea606 27-Mar-2012 Daniel Lam <dalam@google.com> BufferQueue no longer hardcodes buffer counts

BufferQueue is now more flexible as it can be used
by SurfaceMediaSource in addition to SurfaceTexture.

Change-Id: I4222be8918d63372c44fcd412d9ad241c6a3eeb9
ufferQueue.cpp
8cce8a9a75d172e0077960223ac5f2d06df33892 06-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "Fixed disconnect bug in SurfaceTexture"
7b5be95cb3903087742f1079fe89cddd8abe3696 03-Apr-2012 Mathias Agopian <mathias@google.com> use a socketpair instead of a pipe in BitTube

Bug: 6252830
Change-Id: Ia7a7b08409517214136261c05569dc5959a597ab
itTube.cpp
isplayEventReceiver.cpp
ensorEventQueue.cpp
9abe1ebc9575dc5a19bf1dfce6e9b02e03374457 27-Mar-2012 Daniel Lam <dalam@google.com> Fixed disconnect bug in SurfaceTexture

BufferQueue's disconnect could race with updateTexImage
where invalid buffers could be released. Additionally
fixed similar bug with setBufferCount. Tests were added
to stress the disconnect mechanism.

Change-Id: I9afa4c64f3e025984e8a9e8d924852a71d044716
ufferQueue.cpp
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
0e1080f887bcd80c75910cabe7b2eca224bf739c 02-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: add context attach & detach"
74bed55fff0132be319bcd1703970516ae28b3a9 29-Mar-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: add context attach & detach

This change adds the detachFromContext and attachToContext methods to
SurfaceTexture. These methods allow the SurfaceTexture to switch from
one consumer GLES context to another. This change also includes a few
cleanups to the error return codes in updateTexImage.

Change-Id: I0df1eb599aa7b6f58f07431f242f8f09269559ed
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
851ef8f1bfbb164d61b1528a529a464f0a60dbaf 30-Mar-2012 Mathias Agopian <mathias@google.com> reduce IPC with BufferQueue

collapse setCrop, setTransform and setScalingMode to queueBuffer()
this ends up simplifying things quite a bit and reducing the numnber
of IPC needed per frame.

Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
ufferQueue.cpp
SurfaceTexture.cpp
urfaceTextureClient.cpp
9285a16450323d0e91513e2c270c2ac03c8b940c 29-Mar-2012 Jamie Gennis <jgennis@google.com> Merge "Refactored DummyConsumer"
9d61a28d72d85ac0460fb7fba9f85f8a955354c7 27-Mar-2012 Daniel Lam <dalam@google.com> Refactored DummyConsumer

DummyConsumer no longer uses a ProxyConsumerListener

Change-Id: I0a99428b3f9dae82cb47d5da3589de77653f3d7c
ummyConsumer.cpp
9e0b1f880bd790b6e4643387668c74729b891a10 27-Mar-2012 Colin Cross <ccross@android.com> remove libandroid.so from targets that don't need it

pdk builds don't have libandroid.so available. Remove it from
projects that aren't actually using it.

Change-Id: I100dc84aaf8160c1062a122ef6d5aec0534d73fa
ests/Android.mk
f71c4ae136f7749b9dfdaa2dd64d771868eeeb2d 24-Mar-2012 Daniel Lam <dalam@google.com> Added a DummyConsumer for use with BufferQueue.

The DummyConsumer is a consumer that can connect to BufferQueue
that does nothing. It is required as BufferQueue checks
if a consumer is connected. Also fixes a bug where SurfaceTexture
was reusing old texture slots.

Bug: 6172739
Change-Id: I5e7a118dd4d07807ba4c763200242b5ee7d3412b
ndroid.mk
ummyConsumer.cpp
urfaceTexture.cpp
b0e76f456afaada43ddb0968bb37145219f90cd3 23-Mar-2012 Mathias Agopian <mathias@google.com> remove dependency of EGL on ndk header

Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
urface.cpp
urfaceTextureClient.cpp
ce561372186c7549a8a5fe996ac5965cda087007 20-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: have ST::updateTexImage check the GL ctx

This change adds a check to SurfaceTexture::updateTexImage to verify
that the current GL context is the same as the one that was used for
previous updateTexImage calls.

Change-Id: If02d2f787bcfdb528046dc9ddf6665f8a90e1bf4
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
fa5b40ebb8923133df12dc70591bfe35b3f1c9b3 15-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: add BQ consumer buffer free notifications

This change adds a new callback for BufferQueue consumers to be notified
when the BufferQueue frees some or all of its buffers. This is needed
to retain SurfaceTexture behavior where all buffers would be freed when
the producer disconnects. This change also modifies the
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers test to catch
when the buffers are not freed.

The implementation is a little complicated because it needs to avoid
circular sp<> references across what will be a binder interface (so wp<>
can't be used directly). It also needs to avoid the possibility of
locking the BufferQueue and consumer (e.g. SurfaceTexture) mutexes in
the wrong order.

This change also includes a few additional fixes and test cleanups.

Change-Id: I27b77d0af15cb4b135f4b63573f634f5f0da2182
ufferQueue.cpp
urfaceTexture.cpp
ests/SurfaceTextureClient_test.cpp
ests/SurfaceTexture_test.cpp
b267579ba8dfe3f47d2a481c5a3c2254e3d565a1 23-Feb-2012 Daniel Lam <dalam@google.com> SurfaceTexture: Fully refactored from BufferQueue

SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
74ff8c23f44f1546d0c7004302f4c7ba726ff4c0 13-Mar-2012 Dave Burke <daveburke@google.com> attempt to fix a deadlock in SurfaceTextureClient::disconnect

- condition wasn't signaled if an error happened between acquire and release
- also replace signal with broadcasts

Bug: 6109450
Change-Id: I8ac03c7eca35c9cc04a00ef7fad36bb9cb3fcef6
ufferQueue.cpp
c2c1f2f24cd70bdcf1958157bab38467bf0fdc71 07-Mar-2012 Daniel Lam <dalam@google.com> BufferQueue: fixed issues with buffer slots not available

Bug: 6120953
Change-Id: I61d97d650c8dee0a6d7c19f2f50aa92a5f159095
ufferQueue.cpp
757507e3a0a25fe83e60c354b6ac0e975662109a 06-Mar-2012 Mathias Agopian <mathias@google.com> Merge "Add ATRACEs for Buffer indices"
3fcee50ffaeb745819356e395408b4d7e3239c13 02-Mar-2012 Daniel Lam <dalam@google.com> BufferQueue: fixed acquire operation

Bug: 6082872
Change-Id: I897dc61eb84fed953e51f97871cd3ae6321505d4
ufferQueue.cpp
546ed2d7d98ce4f1415647913a231a6b4fc6ca66 02-Mar-2012 Mathias Agopian <mathias@google.com> Add ATRACEs for Buffer indices

Change-Id: I44d7a9a9bf03f418cab2a4854583aac9e533daee
ufferQueue.cpp
1c8e95cf86f2182986385bc1ee85f13f425f3a3a 24-Feb-2012 Jamie Gennis <jgennis@google.com> Add tracing to various graphics components.

This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.

Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
ufferQueue.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
eae59d2ea77ef57aab203fb185a880ce37ac38d6 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: I938e63e085128148c58d0e26c7213b30145c109f
ufferQueue.cpp
urfaceTexture.cpp
fbb16559168b88e30ffbe6d466f4c044366f503c 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "Removed dependecies between BufferQueue and SurfaceTexture""
90ac799241f077a7b7e6c1875fd933864c8dd2a7 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
ufferQueue.cpp
isplayEventReceiver.cpp
GraphicBufferAlloc.cpp
Surface.cpp
SurfaceComposer.cpp
SurfaceComposerClient.cpp
ayerState.cpp
urface.cpp
urfaceComposerClient.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
9b10c47e112afc3600380895046a4a56e34cf6a8 27-Feb-2012 Daniel Lam <dalam@google.com> Revert "Removed dependecies between BufferQueue and SurfaceTexture"

This reverts commit a631399f71dbc7659d2f241968f85d337726ae61
ufferQueue.cpp
urfaceTexture.cpp
333023884112259f145bb23c41a05211198d9792 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: Iff55e740e36a7f70c9f7a17ee7a5af38e3d21f0f
ufferQueue.cpp
urfaceTexture.cpp
b856052c00dfef70d0957482c72c2979ffc4733a 31-Jan-2012 Daniel Lam <dalam@google.com> Refactored query function from SurfaceTexture into BufferQueue

Change-Id: Id1cb6cc38d01edb4fcfcad867c5a7693bdcc3ab1
ufferQueue.cpp
urfaceTexture.cpp
6b091c53000c843211c218ce40287a7edca9bc63 23-Jan-2012 Daniel Lam <dalam@google.com> Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue.

Change-Id: I514f6b802f6b49c9ae27bed37bf0b9d23da03c9a
ndroid.mk
ufferQueue.cpp
urfaceTexture.cpp
99fe3c6d3dcb6fb26bf283343f946d031b052dff 07-Feb-2012 Mathias Agopian <mathias@google.com> make sure to ignore SIGPIPE in the write side of BitTube

Change-Id: If4f037f4403d3ecbcd5f91248354765fc0fa13cb
itTube.cpp
99ce5cdeb383216dee95af4d90e47406b0948ea1 01-Feb-2012 Mathias Agopian <mathias@google.com> separate transactions from updates

with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.

this allows us to work much better without requiring triple-buffering.

Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
isplayEventReceiver.cpp
bff957f0bd0b7d4085dabaefb0852d428a807134 23-Jan-2012 Daniel Lam <dalam@google.com> SurfaceTexture: use fence sync on omap4 & s5pc110

This change enables the use of the EGL_KHR_fence_sync extension in
SurfaceTexture on omap4 and s5pc110 platforms.

Change-Id: Icad5245bab445413ffb8a7c823c296b678bf3250
ndroid.mk
1db13d79518f600d65a4fc006fe42900b890966e 19-Dec-2011 Glenn Kasten <gkasten@google.com> Get AID_GRAPHICS from right place

Change-Id: I97b1754dc7260fec083275c71a8f71ebfb2cefa8
SurfaceComposerClient.cpp
e6f43ddce78d6846af12550ff9193c5c6fe5844b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
itTube.cpp
isplayEventReceiver.cpp
SurfaceComposer.cpp
ensorEventQueue.cpp
ensorManager.cpp
urface.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
32397c1cd3327905173b36baa6fd1c579bc328ff 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
ensorManager.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
c267bab3d1c7980a03541283e88c0b6df378b826 05-Jan-2012 Steve Block <steveblock@google.com> Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE"
2adea706d445e837053403a00286a21c00e22649 05-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros"
99ed22412db547c59d3da08114d9d5a586442b30 15-Dec-2011 Glenn Kasten <gkasten@google.com> Use the standard CC_LIKELY and CC_UNLIKELY macros

Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose. So rename the private
uses to use the standard names.

In addition, AudioFlinger was relying on the macro expanding to extra ( ).

Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
SurfaceComposer.cpp
SurfaceComposerClient.cpp
a19954ab377b46dbcb9cbe8a6ab6d458f2e32bca 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
urfaceTexture.cpp
9d4536835248525f32f1504a3d28d5bbfa0a2910 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
urfaceTexture.cpp
urfaceTextureClient.cpp
ace62f2b79792222f964e2465821539da2813c06 13-Dec-2011 Jamie Gennis <jgennis@google.com> am 74e0fcae: am a1dee3f5: Merge "SurfaceTexture: fix a verbose-log compile error" into ics-mr1

* commit '74e0fcaed1cd20ae8632224ff5a5404ff1a6e497':
SurfaceTexture: fix a verbose-log compile error
988637e559cb76d53568b93571e41c728f2f1b1d 10-Dec-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a verbose-log compile error

Change-Id: I045231207e068d950bb0cb5085717af5d9454ed1
urfaceTexture.cpp
478ae5eb5a0047e1b2988c896cff6363b455ee50 07-Dec-2011 Mathias Agopian <mathias@google.com> Improve the VSYNC api a bit.

- add the ability to set the vsync delivery rate, when the rate is
set to N>1 (ie: receive every N vsync), SF process' is woken up for
all of vsync, but clients only see the every N events.

- add the concept of one-shot vsync events, with a call-back
to request the next one. currently the call-back is a binder IPC.

Change-Id: I09f71df0b0ba0d88ed997645e2e2497d553c9a1b
isplayEventReceiver.cpp
DisplayEventConnection.cpp
a4fbecd1198899a3a4e55795406a06e7c111b13e 30-Nov-2011 Mathias Agopian <mathias@google.com> am 55d3880e: am bb1e7d43: Merge changes I7e973a35,Ib3386fcc into ics-mr1

* commit '55d3880eed3450748eb7b97281e030902ee29c2a':
SurfaceTexture: add EGL_KHR_fence_sync option
SurfaceTexture: add a blit-to-FBO test
86edf4f6470ee0f108bf40d3c1d23bf0a78c9c38 14-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add EGL_KHR_fence_sync option

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
urfaceTexture.cpp
fe27e2f4688301629f38a06c34e3466c9889b3b1 12-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a blit-to-FBO test

This change adds a test for blitting (via GL rendering) from a
SurfaceTexture to an FBO.

Change-Id: Ib3386fcc3f37153277f3e37a26347441bb80ab58
ests/SurfaceTexture_test.cpp
d0566bc26fcf6ca396118701fa11900b627f2c09 18-Nov-2011 Mathias Agopian <mathias@google.com> Add support for sending VSYNC events to the framework

use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
ndroid.mk
isplayEventReceiver.cpp
DisplayEventConnection.cpp
SurfaceComposer.cpp
439cf8576d3b846c0aa0944d84372259bf075d51 29-Nov-2011 Mathias Agopian <mathias@google.com> Fix build.

Revert "Add support for sending VSYNC events to the framework"

This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.

Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
ndroid.mk
SurfaceComposer.cpp
461afeb9fde149f9455acbadf1257d08d33e8eb3 18-Nov-2011 Mathias Agopian <mathias@google.com> Add support for sending VSYNC events to the framework

use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: If4126023fc9c067e56087ec7d16a8fd542ce1794
ndroid.mk
SurfaceComposer.cpp
3ad3807a5c4039618175c042a1121c926c2c62e9 29-Nov-2011 Mathias Agopian <mathias@google.com> BitTube::read now handles EAGAIN

Change-Id: Iacda2386342ba0727bbf278f6c597488d5467bb8
itTube.cpp
41f673c9b3aac0d96e41c928845c39186d565212 18-Nov-2011 Mathias Agopian <mathias@google.com> split ComposerService out of SurfaceComposerClient.h

Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
urfaceComposerClient.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/Surface_test.cpp
6b7c5da722128a89fb939bf3677d9cc04421e29f 22-Nov-2011 Mathias Agopian <mathias@google.com> am cc4d02e0: am 07a2d831: Merge "don\'t report an error when disconnecting from an abandoned surfacetexture" into ics-mr1

* commit 'cc4d02e0cbb99341a0508838c88eeef53180fdfd':
don't report an error when disconnecting from an abandoned surfacetexture
93a098fb6eb709aa404f1fb9febabddd2c35e785 22-Nov-2011 Mathias Agopian <mathias@google.com> am 8390cf39: am 8646cd42: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1

* commit '8390cf39f8a4f74f7baa91d23cba06894a3fb9b5':
enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
185a0a0420f54f9588ec1c7230313023a7a2259b 22-Nov-2011 Jamie Gennis <jgennis@google.com> am c2597295: am 53cf2020: Merge changes I37fd43b5,I91eb29db,I0491ce35 into ics-mr1

* commit 'c25972950c2ea62fb085524dbe737c2bf0f08f4a':
SurfaceTexture: fix a couple tests
EGL: default to swap interval 1
SurfaceTexture: clean up some tests
7723773df352e413f30c8c49c188446c43f25cd3 22-Nov-2011 Mathias Agopian <mathias@google.com> Merge "don't report an error when disconnecting from an abandoned surfacetexture" into ics-mr1
75cf5a7480386856c76d40b301acf94eb329f5da 22-Nov-2011 Mathias Agopian <mathias@google.com> Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
e3603d7d090ba092c76f7e1c8ace3841154ab1a1 20-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a couple tests

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
ests/SurfaceTexture_test.cpp
59769469e4b9b2d8b12c020eb44b030b3927a50b 20-Nov-2011 Jamie Gennis <jgennis@google.com> EGL: default to swap interval 1

This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
6f4cdfe0dbe50d1cc0ce8c03451ab261e8ea3232 20-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: clean up some tests

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
ests/SurfaceTexture_test.cpp
8bee68fac2dba0a72a58a243601d5d7d12e116e6 19-Nov-2011 Mathias Agopian <mathias@google.com> am d0df44b5: am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1

* commit 'd0df44b5c979e00a19187cea35768ba26557e447':
attempt to fix bug 5313580
8b8a004148f2e6337dbf02ef8046d800bf300e89 18-Nov-2011 Mathias Agopian <mathias@google.com> don't report an error when disconnecting from an abandoned surfacetexture

this happens often with CPU Surfaces, which disconnect long
after their surfacetexture has been abandoned.

Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e
urfaceTexture.cpp
7c6eba666917308a64fadb0f0e08d7c041311976 15-Nov-2011 Mathias Agopian <mathias@google.com> enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices

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
ndroid.mk
urfaceTexture.cpp
6285c6cf1076e15bef12da8800ed64e4bd6e2ec8 18-Nov-2011 Mathias Agopian <mathias@google.com> Merge "attempt to fix bug 5313580" into ics-mr1
b963e22ca29b5df1f527a5d4f35ba93788304e49 18-Nov-2011 Jamie Gennis <jgennis@google.com> am 9da22d2c: am 2ba13186: Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1

* commit '9da22d2cc31069d86a92021d8540bb5a77c9591b':
SurfaceTexture: fix a bug with buffer reallocation
a36bcd53ac075054bb39ef506687f4daaf9bac6b 18-Nov-2011 Mathias Agopian <mathias@google.com> attempt to fix bug 5313580

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
urfaceTextureClient.cpp
e984dd11c1c48bde7ce1054692db9a065f4df5f0 18-Nov-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1
aaa3ecff4b49e0918c252e02b3aa18a3ad0d503d 18-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a bug with buffer reallocation

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
urfaceTexture.cpp
1c46c42c165401566e037d3536480bd2c8c0f811 17-Nov-2011 Mathias Agopian <mathias@google.com> am abdade71: am 69c17a11: Merge "Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"" into ics-mr1

* commit 'abdade71bc17153696fe2abe281c5a3b0c2e5abe':
Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"
ccf5b9febc9486c67ace40fbfc53b49eadf2c159 17-Nov-2011 Jamie Gennis <jgennis@google.com> am 7765fc65: am fd6b64f6: Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1

* commit '7765fc651a9519dd2f0ac9d3374a50e9865c5c99':
SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
c554d2b8ad94a367bc40d25666ab2c51ae95276f 17-Nov-2011 Mathias Agopian <mathias@google.com> Merge "Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"" into ics-mr1
c21180ee67d645ebe0a0f381e18790609016f6c6 17-Nov-2011 Mathias Agopian <mathias@google.com> Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"

This reverts commit e7758be6da85728df6b4215f413660c67c5a9740.

Seemed to cause failures un SurfaceTexture.

Bug: 5627450
ndroid.mk
urfaceTexture.cpp
c1ef3c4d7d008b04331c56490ec755f040b3e57a 16-Nov-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1
029f760674b90a1265249b0ea4c9d5d42e2b4454 15-Nov-2011 Mathias Agopian <mathias@google.com> am 556a406c: am 3aa684ec: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1

* commit '556a406cf4dd8a7faa318e0d522d899f8b9da7dc':
enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
a929748ddb67cbece3337c7fda7877fdeb973aa4 10-Nov-2011 Sunita Nadampalli <sunitan@ti.com> SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call

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>
urfaceTexture.cpp
251ce852cc1f29808ed9537dae00a9ef7e58edcf 15-Nov-2011 Mathias Agopian <mathias@google.com> enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices

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
ndroid.mk
urfaceTexture.cpp
8c11963dda80d4add300520a8863bed39231825d 14-Nov-2011 Mathias Agopian <mathias@google.com> am 738d8cae: am c93a151f: Merge "Define, document, and test the behavior of very large SurfaceTextures" into ics-mr1

* commit '738d8cae2239d194429676f2889cfae3c8f7ba08':
Define, document, and test the behavior of very large SurfaceTextures
194c76c0477189700fda068e19b953b1d9af201a 10-Nov-2011 Mathias Agopian <mathias@google.com> Define, document, and test the behavior of very large SurfaceTextures

updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
ests/SurfaceTexture_test.cpp
eade85c60c8b2a199d45a02ea7496409d771b25d 03-Nov-2011 Jamie Gennis <jgennis@google.com> am c5ce130f: Merge "SurfaceTexture: various logging improvements" into ics-mr1

* commit 'c5ce130f658303299bf55091373951f7fd33ae36':
SurfaceTexture: various logging improvements
6ee96ad6a3da260f2473f78ea0582fd0970cf156 19-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: various logging improvements

Change-Id: I1f7216276547a1e9f9343c88c6cc1c24efcdcdbc
urfaceTexture.cpp
7796e962da502e0adaff0d407023f731a83a422f 26-Oct-2011 Mathias Agopian <mathias@google.com> Merge "Rename SensorChannel to BitTube"
6807e59e0ff943cc6225d46e3c33a8a7eae9b3d7 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTexture_test.cpp
5cae0d0699a169e468fff3e21165f35db12f2cde 21-Oct-2011 Mathias Agopian <mathias@google.com> Rename SensorChannel to BitTube
ndroid.mk
itTube.cpp
SensorEventConnection.cpp
ensorChannel.cpp
ensorEventQueue.cpp
83d3fa10d5d53308fafee8e702ac4dc86dc8383f 20-Oct-2011 Jesse Hall <jessehall@google.com> Merge "SurfaceTexture: add tests for buffer leaks"
79e3125d56cca5aba88097b5ccd4f1e128bc8141 20-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add tests for buffer leaks

This change adds two tests to ensure that eglDestroySurface does not
cause Gralloc buffers to be leaked.

Bug: 5472838
Change-Id: Id675d74e34b6479f2d68314d40de94aede69f142
ests/SurfaceTexture_test.cpp
baf0e06dea2300ed79fb5874b706eb4115fc2ad7 19-Oct-2011 Jamie Gennis <jgennis@google.com> am 827d069a: Merge "SurfaceTexture: free buffers when disconnect fails" into ics-mr0

* commit '827d069afb297b6d96c995c03da9d4ee17e60679':
SurfaceTexture: free buffers when disconnect fails
13c5ca3b5562ac673a08b17790d89460729c6e7d 19-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: free buffers when disconnect fails

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
urfaceTextureClient.cpp
7731f4eb63a128b31484d4014c18e74c6a32c18a 18-Oct-2011 Mathias Agopian <mathias@google.com> am 9a0732af: Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0

* commit '9a0732af1bd96a7d8247dee124a7da389137a52f':
SensorManager reconnects to sensor service when the later dies
0ee55fd4e51bb340587730a68f4b52cce288d97b 18-Oct-2011 Mathias Agopian <mathias@google.com> Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0
31218730d4d3f36d897ba6020c629d6b29ad0d5d 17-Oct-2011 Jamie Gennis <jgennis@google.com> am 3a735078: Merge "SurfaceTexture: report binder transaction failures" into ics-mr0

* commit '3a73507801b56da83140fad14a1a3d4eced213d9':
SurfaceTexture: report binder transaction failures
2532077bb664860b7177b1e932af1448881574e5 17-Oct-2011 Mathias Agopian <mathias@google.com> am fefffc68: Merge "add logging and defensive code when initializing sensors" into ics-mr0

* commit 'fefffc685ab703b44f6e32b5ec45292b22d370a3':
add logging and defensive code when initializing sensors
8e42e48f4ea6bd8988a2ab5667601564d6f6b9ee 17-Oct-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: report binder transaction failures" into ics-mr0
1a2b83a17d3bdb2440b8b5b96136f7916a5528b5 17-Oct-2011 Mathias Agopian <mathias@google.com> SensorManager reconnects to sensor service when the later dies

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
ensorManager.cpp
be58de0d627fa0ecb087eeff95da13c783bf2392 16-Oct-2011 Mathias Agopian <mathias@google.com> add logging and defensive code when initializing sensors

Bug: 5445240
Change-Id: I9dc7d27d3e8b4f15989488859831526d8c7ded3b
ensorManager.cpp
28378392fd5aa3e0a392c9eb64634055678c3987 13-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: make sync transactions explicit

This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.

Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
SurfaceComposer.cpp
urfaceComposerClient.cpp
8a29ff2a356816694c695db70460f93c7fb4ae6f 15-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: report binder transaction failures

This change fixes the ISurfaceTexture error reporting for the case where
the binder transaction fails.

Bug: 5082219
Change-Id: I6517532992e3a76dc9eb5e4a36af43a562391aaa
SurfaceTexture.cpp
c901ca0abc0a7b90deb8754ae48542de0bfd1567 12-Oct-2011 Jamie Gennis <jgennis@google.com> Surface: fix a protected buffer test

This change renames the ScreenshotsOfProtectedBuffersFail to
ScreenshotsOfProtectedBuffersSucceed and changes the test to verify that
the screenshot succeeds.

Change-Id: I960bb8eed4211578cb4dc446b08392937da064b6
ests/Surface_test.cpp
b8d69a55f1c187a35ac41e69de63251f5501b6f4 11-Oct-2011 Jamie Gennis <jgennis@google.com> SurfaceFlinger: update orientation via transactions

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
SurfaceComposer.cpp
urfaceComposerClient.cpp
fb1b5a2f333800574b0da435d1200cf9b13d723f 28-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: parameterize the texture target

This change adds a hack to allow Android Browser to use a SurfaceTexture
to stream RGBA images to a GL_TEXTURE_2D texture object.

Change-Id: Idb90064d5d4b920959ef3be7451362ac5012460e
urfaceTexture.cpp
fa28c35c21d1bf8b38f541758c291bc17a2d7270 17-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add name support

This change adds support for setting a string that can be used to
identify a SurfaceTexture object in log messages.

Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
urfaceTexture.cpp
06649fece4d97a89c6b197a570b6012e9ad9d228 16-Sep-2011 Mathias Agopian <mathias@google.com> cleanup: fix typos in logs

Change-Id: Ib5744564a873ea2b84100174673dc4d3ae109fcf
urfaceTexture.cpp
7f739ae68c57435964f69c397ec0cf344d0701a2 05-Sep-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix a test deadlock"
66378c63e6f1c51147f21d098a5568e0724c152d 03-Sep-2011 Pannag Sanketi <psanketi@google.com> Error check in queuebuffer in SurfaceTextureClient

In queuebuffer, if the surfacetexture returns an error,
surfacetextureclient should check for that and pass on the error.

Change-Id: Ie6d70e779fac0702f372eb4df5ecb655280875ee
urfaceTextureClient.cpp
bc82a96491d545b4a2a44ff536bd4f06b724372d 31-Aug-2011 Xia Wang <xiaw@google.com> Merge "Integreate surfacetexture test into our continuous test framework."
4c875166c8d186de29e254c28261ac576930ab98 31-Aug-2011 Xia Wang <xiaw@google.com> Integreate surfacetexture test into our continuous test framework.

Change-Id: Ic481f3a431166851947676d676749543c7afbbf7
ests/Android.mk
e68a52b0a2fbf239c23e622bda45ae50ee7e82ab 31-Aug-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a test deadlock

This change fixes a test issue that resulted in a deadlock.

Change-Id: I4729e8dd47c8f5fea49bfeff3cea58627ead6d04
Bug: 5174876
ests/SurfaceTexture_test.cpp
41b6aabf356d8a505da37b1d046bc9010028fe8b 31-Aug-2011 Mathias Agopian <mathias@google.com> fix Surface positions are not floats

Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
urfaceComposerClient.cpp
70e3f81d0fbc92394928c44fb0137787a8595665 26-Aug-2011 Mathias Agopian <mathias@google.com> make sure to re-initialize SurfaceTexture to its default state on disconnect

this caused problems where the NavigationBar would disapear or be
drawn in the wrong orientation.

Change-Id: I083c41338db83a4afd14f427caec2f31c180d734
urfaceTexture.cpp
urfaceTextureClient.cpp
87a96ea9eae3f998381735ec65496e256f871c3c 24-Aug-2011 Mathias Agopian <mathias@google.com> Fix an issue where Surface::lock() would never update the output region

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
urface.cpp
7f7e85898f6dd9325418a2d2a30a8df48e52b66d 18-Aug-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix queues-to-composer"
582270d69db94286a248bd829f1ae6f910d45124 18-Aug-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix queues-to-composer

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
SurfaceComposer.cpp
urface.cpp
urfaceTextureClient.cpp
29b5762efc359022168e5099c1d17925444d3147 18-Aug-2011 Mathias Agopian <mathias@google.com> don't return the current buffer from dequeueBuffer

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
urfaceTexture.cpp
3902be629bd94de62db0039004d0b25556227cbf 17-Aug-2011 Mathias Agopian <mathias@google.com> fix a small race condition when returning the default width/height of a SurfaceTexture

Change-Id: I581bf609505dfb5d4ec5957b2ef2c77df6cfb15f
urfaceTexture.cpp
4925ee11f980cdeba1166fe07a6b59ff88b25d5c 11-Aug-2011 Dave Burke <daveburke@google.com> Revert "error out when SurfaceTexture APIs are called while not connected"

This reverts commit a04cda9986366ab480ad8008c4d923271b05d78e.

Conflicts:

include/gui/SurfaceTexture.h
libs/gui/SurfaceTexture.cpp

Change-Id: Ib655016462c496ee2a27f7cb33a6e8b18cfe684a
urfaceTexture.cpp
3477588d13a8dfb4fefe01a8c81c0c74f8f5c72f 11-Aug-2011 Mathias Agopian <mathias@google.com> Merge "Read leftover parcel data when a parceled Surface is found in the cache."
8e19c2e97e11505ee2ecf336275fd956f2ccfa22 11-Aug-2011 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture::updateTexImage()

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
urfaceTexture.cpp
2560d14ce8e38984032d999e3fdf8da9a47baf3c 11-Aug-2011 Mathias Agopian <mathias@google.com> rework dequeueBuffer()'s main loop.

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
urfaceTexture.cpp
ef51b992192adf4fc432686ab346f5fc7a13bc95 11-Aug-2011 Mathias Agopian <mathias@google.com> error out when SurfaceTexture APIs are called while not connected

- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked

Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
urfaceTexture.cpp
e5d6eb81e29e0fb914ce8fdaae17190b0dbae1a1 10-Aug-2011 Ted Bonkenburg <tedbo@google.com> Read leftover parcel data when a parceled Surface is found in the cache.

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
urface.cpp
2db6f0a40b7f4d903f546e94af762f141953ebb2 10-Aug-2011 Mathias Agopian <mathias@google.com> fix a crasher in dumpsys

Bug: 5141729
Change-Id: Ib104d49c8660621180966be099198fe29c5bebf5
urfaceTexture.cpp
b0c15c9908d9e61554b04c7469b62618e7778167 09-Aug-2011 Mathias Agopian <mathias@google.com> free all buffers when ANativeWindow::disconnect is called

Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc
urfaceTexture.cpp
5bfc24515bb5c8ea7975f72d538df37753733a2f 09-Aug-2011 Mathias Agopian <mathias@google.com> return correct value from query after connecting a surface

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
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
af08d8ab6dd2188544ca4f038f33c1c4ed8447cf 09-Aug-2011 Mathias Agopian <mathias@google.com> Merge "improve dumpsys SurfaceFlinger output"
e47498f8f258967ff62d070f08ff2dadd4ae2b56 09-Aug-2011 Mathias Agopian <mathias@google.com> add some logs to track a crash in eglCreateImageKHR

Bug: 5111008

Change-Id: I3e7f5b986151e80cbded39e0dec057770da52fc1
urfaceTexture.cpp
ad795baecccf239621cbffa0249c8e855296cae6 09-Aug-2011 Mathias Agopian <mathias@google.com> improve dumpsys SurfaceFlinger output

we now output the handle and size of all buffers of each layer.

Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
urfaceTexture.cpp
97a9884edcc6fbb311386ecfcd6e3045437f0df0 04-Aug-2011 Mathias Agopian <mathias@google.com> Add a 'release' method to the SurfaceTexture public Java API

Bug: 5063618
Change-Id: I689cb0c01c14e597ccfb4eb0972e64fa570bd4e8
urfaceTexture.cpp
d05b34a07940f3d6009b90b3eda067a2d0a35d2c 02-Aug-2011 Mathias Agopian <mathias@google.com> Merge "connect/disconnect is now called from our EGL wrapper"
81a63350527cafce6929309533c58586878f10b5 30-Jul-2011 Mathias Agopian <mathias@google.com> connect/disconnect is now called from our EGL wrapper

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
urfaceTextureClient.cpp
1c121f68fc6ac4abff17203b55253d6aeee64bc5 31-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: allow set_buffer_count(2)

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
urfaceTexture.cpp
96e108271bb5da44a130c8b5976fc63879403735 26-Jul-2011 Mathias Agopian <mathias@google.com> Merge "remove dead code and member variables."
3fbce7c56082e4e0d23f1c1c89983d3841853ed7 26-Jul-2011 Mathias Agopian <mathias@google.com> remove dead code and member variables.

also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
urfaceTexture.cpp
urfaceTextureClient.cpp
fa1e002cec5dc33ebe52685dc81d644f783811a8 25-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: enable RGB external textures"
8d14330bd7c8ce855efb2284b306a314759ac4df 25-Jul-2011 Ted Bonkenburg <tedbo@google.com> Merge "Add support for creating a Surface from a a SurfaceTexture."
bd050ab2af1421d527d1a80ce59dd8d9940a838c 16-Jul-2011 Ted Bonkenburg <tedbo@google.com> Add support for creating a Surface from a a SurfaceTexture.

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
urface.cpp
1f8e09f40d16ae377164d86e91385ad3d8e78e82 20-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable RGB external textures

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
urfaceTexture.cpp
ests/SurfaceTexture_test.cpp
7b305fffc39d0fe0926e7fd2d7f6a524fbce62b7 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add the abandon method.

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
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTexture_test.cpp
6e50219aee68ae6e76943f969374dae1b27154b3 21-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a deadlock scenario test

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
ests/SurfaceTexture_test.cpp
1259e9d6ac474f3e9dec8569fb694c61eeeef4d3 22-Jul-2011 Jamie Gennis <jgennis@google.com> Merge changes I799532f7,I5cffa6eb

* changes:
SurfaceTexture: fix a comment
SurfaceTexture: remove getAllocator
bb66c9b5a9c16dee93559eb738746a2d0a9b2db3 21-Jul-2011 Mathias Agopian <mathias@google.com> Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINT

- 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
urfaceTextureClient.cpp
976f494d53cb239307fd810ce592b5b5de1cbc41 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: remove getAllocator

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
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
c10d9d90b2088a3304076e0dc4bf05cdbb5d45ab 21-Jul-2011 Mathias Agopian <mathias@google.com> clean-up. get rid ofunused code and members in Surface[Control].cpp

Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
SurfaceComposerClient.cpp
urface.cpp
urfaceComposerClient.cpp
ests/SurfaceTextureClient_test.cpp
97c602c5af5f3ffd69009bf496d86347b71a2b4c 20-Jul-2011 Mathias Agopian <mathias@google.com> implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"

Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
933389f75814bb62e8153528f9cff2cb329b77df 19-Jul-2011 Mathias Agopian <mathias@google.com> use SurfaceTexture new scaling mode in SF

SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size

Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
urfaceTexture.cpp
urfaceTextureClient.cpp
7734ebfe47f42f980c1b44c1f284a91d8ad1d6c7 14-Jul-2011 Mathias Agopian <mathias@google.com> Add set_scaling_mode() to ANativeWindow.

This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
a2f3b90d986936b6584331efd766b4996ff74b5a 19-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: add a multi-SurfaceTexture test"
8f9dbf9e13b927de2524116c30544f7dfbbbf56c 14-Jul-2011 Mathias Agopian <mathias@google.com> move lock/unlock implementaion outside of Surface into SurfaceTextureClient

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
urface.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
0b7c4953a1995e22932ee93a7f494a79547e19c8 15-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix SurfaceTextureGLToGLTest"
2773004a83624ed41cf3f94f2b11878cd8521812 15-Jul-2011 Mathias Agopian <mathias@google.com> fix a typo in ISurfaceTexture IPC code

Change-Id: Ied1d9ddb0d849b17219d0ea3d333ce12be849419
SurfaceTexture.cpp
677517ae3f380e701a47abe4738b748fb3ca161d 15-Jul-2011 Jamie Gennis <jgennis@google.com> Merge changes Id9aa1003,I8c154189

* changes:
SurfaceTexture: make (dis)connect into an IPC
SurfaceTexture: add support for new connect values
fe0a87b54654a1392650e7f1862df473287d8332 14-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: make (dis)connect into an IPC

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
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
2640bfd1680b1be023aae091503ffbda707e3234 15-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix SurfaceTextureGLToGLTest

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
ests/SurfaceTexture_test.cpp
3e646d62e5b99bf479c775e88fa8324229a0670f 13-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add support for new connect values

This change adds support to SurfaceTextureClient for the new enum values
that can be passed to the ANativeWindow connect call.

Change-Id: I8c15418909e43a15673a9b22a5eb40df6923b273
urfaceTextureClient.cpp
71753982479b9a68e36d43fbb58de0331ea5797c 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Merge "Remove the simulator target from all makefiles. Bug: 5010576"
baa44b89ec159fd65230cbb8ebab62d63a513b0b 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
ndroid.mk
ests/Android.mk
c8251a06df70de70d45ac477af816dcee7580205 12-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a multi-SurfaceTexture test

This change adds a test that does simple, unverified GL rendering to
multiple SurfaceTextures.

Change-Id: I51a41d68ae5a27e01ae93842242897b0d3558ca6
ests/SurfaceTextureClient_test.cpp
bee205fd58a27c10a0895de5339e76025d429d2b 01-Jul-2011 Jamie Gennis <jgennis@google.com> EGL: fix the ANativeWindow size/fmt override

This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface. The new behavior
is to leave the size untouched when overriding the format. The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
urfaceTextureClient.cpp
798ff739a1da6bea3f5f3ff13b580062e1a3a03a 07-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: enable newly passing tests."
47dd726460e3a02ec80f14e300bb3a42884fc1e5 06-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable newly passing tests.

This change enables the following four SurfaceTextures tests:
UpdateTexImageBeforeFrameFinishedWorks
UpdateTexImageAfterFrameFinishedWorks
RepeatedUpdateTexImageBeforeFrameFinishedWorks
RepeatedUpdateTexImageAfterFrameFinishedWorks

Change-Id: I7632630bc97873e50d4a765ffc44a86f16ae62f1
ests/SurfaceTexture_test.cpp
9303eee7dcfc340b2aa598b617e02cd361baa5cc 02-Jul-2011 Mathias Agopian <mathias@google.com> fix ScreenshotsOfProtectedBuffersFail

- put the test window at the front most screen position
- use RGBA_8888 which is a mandatory format
- handle devices that don't support the protected usage flags

Bug: 4950464

Change-Id: I0005fb667cfe094e5978816e2924b294c5ef817e
ests/Surface_test.cpp
d9e8c64c3dce1612eb948a5c16ba4ff62202b423 01-Jul-2011 Mathias Agopian <mathias@google.com> return an error code with gralloc buffer allocation failures

Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
GraphicBufferAlloc.cpp
urfaceTexture.cpp
19e0a8bfe9a15543b0bd7991cce08e5362e9f5cd 01-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Minor fix in SurfaceTexture"
292a31a4c2ae2f6faf134e8e4a726583017dad06 24-Jun-2011 Pannag Sanketi <psanketi@google.com> Minor fix in SurfaceTexture

Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
urfaceTexture.cpp
698c0873cf2e07bdc7fd1e72169aee2a19fa40d7 29-Jun-2011 Mathias Agopian <mathias@google.com> SF transactions are now O(1) wrt IPC instead of O(N).

Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
SurfaceComposer.cpp
SurfaceComposerClient.cpp
ayerState.cpp
urfaceComposerClient.cpp
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
dfcff4b4ef8b602ba485848b394b16d14847821e 17-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a CPU -> GL sync test.

This change adds a test to verify that proper synchronization is done
when using SurfaceTexture to use CPU generated images as OpenGL ES
textures in 'synchronous mode'. Synchronous mode is particularly tricky
because SurfaceTexture will allow the buffer that's currently bound to
the GL texture to be dequeued. We rely on Gralloc's lock function to
block until this buffer is no longer being used by the OpenGL ES.

Change-Id: I1c4e37f3e9d60ab9a0905a90a1f5060fda8e485c
ests/SurfaceTexture_test.cpp
50c4efc2a44fd312febeda76c8d1a6dc42cee8f8 28-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: consume buffers after err checks

This change moves the point at which queued buffers get consumed to
after any error checks that could cause updateTexImage to fail. This
way, if updateTexImage returns an error the buffer remains queued.
urfaceTexture.cpp
3d8063b02e06020c8062addcc9ec49048d3bdb9a 27-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: change onFrameAvailable behavior

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
urfaceTexture.cpp
14a0e58074f2698829b6554f578e6762c377caa3 24-Jun-2011 Grace Kloba <klobag@google.com> Add allowSynchronousMode to SurfaceTexture constructor.

Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
urfaceTexture.cpp
1e7fa9e945d98eab76ff92f37c25040429a6c0a0 23-Jun-2011 tedbo <tedbo@google.com> Add method to create a ParcelSurfaceTexture from android.view.Surface.

Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
urface.cpp
c8c5152b19e20abe76dbc63b782700ae01aa4116 15-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: make tests use a large framebuffer.

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
ests/SurfaceTexture_test.cpp
b36bb97ae37a0fbcb6a35770eb86ac5931409d0d 21-Jun-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: fix a NULL ptr dereference."
1c4414091cfb93206067fb64eba445653739d40f 20-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a NULL ptr dereference.

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
urfaceTextureClient.cpp
07ed1a94bcad9b78b20f74f890d4271099da3a97 15-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable a test that now passes.

This change enables the QueryFormatAfterSettingWorks.

Change-Id: Ic868011a36a6c86c8646880246cd5b6960a13364
ests/SurfaceTextureClient_test.cpp
d05bb2ed4c99894965134994cf23c9e47274f56e 15-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable a test that is now passing.

This change enables the TexturingFromCpuFilledYV12BufferPow2 test.

Change-Id: Ib356ee3d2f8979f34f849fd4090f598295e2e92e
ests/SurfaceTexture_test.cpp
5dd0c4fd7efcb99bdd346ed01f1a8f1d2baa8ef1 14-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: increase the test's Surface layer.

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
ests/SurfaceTexture_test.cpp
1876d13e45ae044d4c1f6f2ee176f52f22d8a26c 18-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add some RGBA_8888 tests.

Change-Id: Id09915c98a00eca1209b7dab32039a06d260908e
ests/SurfaceTexture_test.cpp
8b69defa2fe2cf6a34b00e322a557d8a4dddea41 07-Apr-2011 Jamie Gennis <jgennis@google.com> SurfaceTextureClient: minor test refactoring.

Change-Id: Iabc6d27ca35d30d896c6aef65c4f1b5a1eed47b8
ests/SurfaceTextureClient_test.cpp
135abde4c24db77915407e3d9d2478c237638684 14-Jun-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: add a format querying test."
80728d87c9db75d07fafc80e8d5c5f8dd6a58359 14-Jun-2011 Mathias Agopian <mathias@google.com> Merge changes I9b8e1962,I7bb843ca

* changes:
Temporarily don't return the current buffer in synchronous mode
unify SurfaceTexture and Surface
e122079be632b849a71181d83a6d38b701f642f5 05-May-2011 Mathias Agopian <mathias@google.com> Temporarily don't return the current buffer in synchronous mode

activate synchronous mode by default.
urfaceTexture.cpp
ests/SurfaceTextureClient_test.cpp
a67932fe6864ac346e7f78b86df11cf6c5344137 20-Apr-2011 Mathias Agopian <mathias@google.com> unify SurfaceTexture and Surface

Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
ndroid.mk
Surface.cpp
SurfaceComposer.cpp
SurfaceComposerClient.cpp
haredBufferStack.cpp
urface.cpp
urfaceComposerClient.cpp
urfaceTextureClient.cpp
a6f35dd36e974c67976c6b4411c31b61f30a3853 12-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a format querying test.

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
ests/SurfaceTextureClient_test.cpp
2510d9576ff2c529d584082aa1098480a73079e4 13-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: disable a deadlocking test.

This change disables the UpdateTexImageAfterFrameFinishedWorks test
because it's currently causing deadlocks on some devices.

Change-Id: Ic9186db207e8d656f3af5d86fa138c7d96393c55
ests/SurfaceTexture_test.cpp
824efa74e7ff0a8dd95302daf73c23a056da0d07 13-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add a pixel tolerance to the tests.

This change adds a default tolerance of 2 to all the pixel value checks
in the SurfaceTexture tests.

Change-Id: Id5a7cdffdfae16076e2daf4964a3326105b5ae2c
ests/SurfaceTexture_test.cpp
5451d15ee209f29d64beea87583f7058dee69911 08-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add some GL->GL tests.

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
ests/SurfaceTexture_test.cpp
52226048095c2eb27ede0c3389626df270a0abff 08-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add getTransformMatrix tests.

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
ests/SurfaceTextureClient_test.cpp
736aa9573bb7b78f9c315f396c104491b3639426 13-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a getTransformMatrix crash.

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
urfaceTexture.cpp
b62013f6aafee08cfad25a2712dc32264e44f783 18-May-2011 Mathias Agopian <mathias@google.com> 9-axis sensor fusion with Kalman filter

Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
ensor.cpp
8dda6b7bf8f6e30cee286a6c048f1cc2adfa3a94 25-May-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: disable a failing test.

The SurfaceTextureSyncModeWaitRetire test was disabled. It is failing
because of the synchronization hacks that were added to SurfaceTexture
to work around bugs in vendor device drivers.

Change-Id: I09a74538bfe14a04833acb6847471e00826cc7fc
ests/SurfaceTextureClient_test.cpp
c2c8dfd71b84598f01074416e57cc3469d5b8ed2 24-May-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix an error check in dequeueBuffer.

This change fixes the MIN_UNDEQUEUED_BUFFERS error check in
dequeueBuffer. The check should only be performed if a buffer has been
queued since the last time the buffer count was changed by the client.
The check must be applied conditionally because video decoders require
all the bufferes to be dequeued and registered before beginning the
decode.

Change-Id: I08d96b380544e395c2fcf0f3983a199bfd695b09
urfaceTexture.cpp
ests/SurfaceTextureClient_test.cpp
8cd5ba4b7f01d3a54a8f8bc6d1793aa5fc8e09ef 19-May-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: clean up some comments, tests, etc.

This change fixes up some stale comments, member variable names, log
messages and disables a failing test.

Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
d7e291fecd2e6a104c713b4e45860734d02833c6 18-May-2011 Teng-Hui Zhu <ztenghui@google.com> Disable error report temporarily to enable inline video

bug:4435022

Change-Id: I06f05a4781ad432ab71db93f0815eb89cd2e7a69
urfaceTexture.cpp
cf46eb9817dfbfc020720d1e45b5c085252500fb 12-May-2011 Mathias Agopian <mathias@google.com> fix onFrameAvailable

Change-Id: I391fe9f6684ac9fd4f91416ce18b583f7087d966
urfaceTexture.cpp
68c7794183a7dbfe3b20d4ce832f8eb79c2c619a 10-May-2011 Mathias Agopian <mathias@google.com> Add SurfaceTexture logging

Change-Id: If1b74be5230813fb76429935d88b9d4a7c41700c
urfaceTexture.cpp
8072711307aa98ee5ee6f7369860ae38c3e19656 03-May-2011 Mathias Agopian <mathias@google.com> Implement {Surface|SurfaceTextureClient}::setSwapInterval()

Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
7a5b22c4e33928f81c2e8a3d85050c35bd44b1e0 26-Apr-2011 Mathias Agopian <mathias@google.com> new tests for SurfaceTexture synchronous mode

Change-Id: Icfdaa625238246f8d0224efe28fdf2c1c24203f8
ests/SurfaceTextureClient_test.cpp
b3e518c820c7dbe35587bd45c510e4e5e7cfd9c9 22-Apr-2011 Mathias Agopian <mathias@google.com> Add the concept of synchronous dequeueBuffer in SurfaceTexture

Change-Id: Ic94cbab092953243a0746e04bbe1b2eb0cc930ef
urfaceTexture.cpp
eafabcdc1639fb96062d9e3c39b0ae27b0238ae1 20-Apr-2011 Mathias Agopian <mathias@google.com> unify SurfaceTexture and Surface

Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
c04f153353cdb0d291297d10452239f791d3fd2b 26-Apr-2011 Mathias Agopian <mathias@google.com> Fix a bug where setgeometry couldn't be undone

This change the binder protocol between SurfaceTextureClient
and SurfaceTexture. dequeueBuffer() now takes the requested
parameters for the buffer. SurfaceTexture decides if the
buffer needs to be reallocated and does the allocation
if needed. In that case it returns BUFFER_NEEDS_REALLOCATION
to tell SurfaceTextureClient that it needs to call
requestBuffer (which all parameters have been removed) to
acquire a pointer to the buffer.

dequeueBuffer and requestBuffer could be folded into a single
IPC call, but we chose to optimize the case where buffers are
not created and avoid some complexity in the marshalling code.

Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
697526bc9e44ce61c88614f98387ae8bbf0a187e 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
urface.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
41abd67302b52aefadc2b3dea42226f16bf6d9ba 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: make the ANativeWindow query() method const

query() does not modify the object's data, so it needs to be a const method

Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
urface.cpp
urfaceTextureClient.cpp
39a01c66947cd56c80ff406c277d9debc0efa7cc 29-Apr-2011 Jamie Gennis <jgennis@google.com> Merge "libgui: enable tests in the 'tests' build."
cc57d6f8830e533734925f102307df2e6cff6de7 28-Apr-2011 Mathias Agopian <mathias@google.com> Fix uninitialized variable in SurfaceTexture

Change-Id: Ie77cdad481fc0522ff5ea3b7e14ce94e07150793
urfaceTexture.cpp
7fcb077c5522c56e266947e073c8750019e5a98a 27-Apr-2011 Jamie Gennis <jgennis@google.com> libgui: enable tests in the 'tests' build.

This change makes the libgui makefile recurse into the tests directory
so that the tests get built by a top-level make when
TARGET_BUILD_VARIANT=tests.

Change-Id: I6f623cc4b86dfeb00b9d21823316dbd9def23110
ndroid.mk
ests/Android.mk
3cd5a117083e6a53b9946e8c316377658ab79b3d 26-Apr-2011 Mathias Agopian <mathias@google.com> Report errors when eglCreateImageKHR fails

Change-Id: Ica39b72ac2505675e619ef4994bd67b98bf6e7da
urfaceTexture.cpp
1b528fb9d818044973abf656c9d2d3c1192bcfdc 26-Apr-2011 Jamie Gennis <jgennis@google.com> EGL: Allow creating a SurfaceTexture EGLSurface.

This change removes the check that disallowed the creation of an
EGLSurface that would send frames to a SurfaceTexture.

Change-Id: I44c6d5df503cc676a88144d72d39b414692ce4c9
ests/SurfaceTextureClient_test.cpp
fc850124b35abd00a31e9bcf57e14e0fa74f4cd7 26-Apr-2011 Jamie Gennis <jgennis@google.com> libgui: Fix the tests so they build.

Change-Id: I7205b0819e5801ac549109ff562c3ab1b113d176
ests/SurfaceTexture_test.cpp
ests/Surface_test.cpp
0ef4e15a6c12778daf464a4953d7e15e651f49ac 20-Apr-2011 Mathias Agopian <mathias@google.com> Get rid of the "pid" parameter from createSurface

Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
SurfaceComposerClient.cpp
urfaceComposerClient.cpp
7e3d7f341ab3789fe25064670374159a35e35ed3 19-Apr-2011 Mathias Agopian <mathias@google.com> Merge "changes to SurfaceTexture needed for unification with SF"
7a042bf324fe3f3d5d4085fda21fe50dc0c362b4 12-Apr-2011 Mathias Agopian <mathias@google.com> changes to SurfaceTexture needed for unification with SF

- implement connect/disconnect
- implement missing query
- handle texture_2d in addition to texture_external_oes

Change-Id: I971a70821f00f22b01f5337de4a7d451177fec4d
urfaceTexture.cpp
urfaceTextureClient.cpp
4cb18881b55b82a24873ccd8e298bc2d5a9c17e5 09-Apr-2011 Mathias Agopian <mathias@google.com> Fix a GraphicBuffer leak in SurfaceTexture

This leak was intentional, it was there to deal with the fact that
some gralloc implementations don't track buffer handles with
file-descriptors so buffers needed to stay alive until there were
registered, which is not guaranteed by binder transactions.

In this new implementation, we use a small BBinder holding a
reference to the buffer, which with tuck into the parcel. This forces
the reference to stay alive until the parcel is destroyed, which
is guaranteed (by construction) to happen after the buffer is
registered.

this allows the public facing API to not expose the previous hack.

Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
GraphicBufferAlloc.cpp
urfaceTexture.cpp
47d8730a2463f38a695ab95b533b0d9728f266a3 06-Apr-2011 Mathias Agopian <mathias@google.com> remove more unused references to ISurface

Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
urface.cpp
a5c75c01620179ce00812354778a29a80d76e71f 01-Apr-2011 Mathias Agopian <mathias@google.com> SurfaceTexture can now force the client to request a buffer

SurfaceTexture now has the concept of default size a new method,
setDefaultBufferSize() to set it. When the default size is
changed, dequeueBuffer() will return a value telling the
client that it must ask for a new buffer.

The above only applies if the client has not
overriden the buffer size with setGeometry.

Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
urfaceTexture.cpp
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
d87f162026454f5a3e6437ed0c9ef51651a6b939 26-Mar-2011 Mathias Agopian <mathias@google.com> merge libsurfaceflinger_client into libgui

this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
ndroid.mk
GraphicBufferAlloc.cpp
Surface.cpp
SurfaceComposer.cpp
SurfaceComposerClient.cpp
ayerState.cpp
haredBufferStack.cpp
urface.cpp
urfaceComposerClient.cpp
ests/Android.mk
ests/Surface_test.cpp
1d01a12e7150be569557b64da9b8663c62c13594 18-Feb-2011 Eino-Ville Talvala <etalvala@google.com> Add support for timestamps into SurfaceTexture.

API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().

Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp(). For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.

bug:3300707

Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
5c0c93a8c49b4053744efb8953b915fa7f0923a5 14-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: disallow unsupported uses.

This change makes the ANativeWindow_lock NDK function error out if it is
passed an ANativeWindow with a concrete type that is not Surface. It
also makes eglCreateWindowSurface fail if it is passed a
SurfaceTextureClient as its 'window' argument.

Bug: 4087277
Change-Id: Ie68c50c52d88f72d8a387f6c094908044c83a88c
ests/SurfaceTextureClient_test.cpp
bae774eb20bebd409441b93386b51bccda75f546 14-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTextureClient: Add ISurfaceTexture getter.

This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
391bbe2246a7547dbf3460c231b3c5ba691d4eb1 14-Mar-2011 Jamie Gennis <jgennis@google.com> ANativeWindow: add query for the concrete type.

This change adds a query to the ANativeWindow interface for getting the
concrete type of the ANativeWindow.

Bug: 4086509
Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
urfaceTextureClient.cpp
ests/SurfaceTextureClient_test.cpp
d99c088f35960b7f0ef948c3bb948a99a800eba1 11-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix transform matrix computation.

This change fixes the transform matrix computation in SurfaceTexture
when a crop rectangle is specified by the image producer. It also adds
a test for this case as well as a basic test for the uncropped case.

Bug: 4070775
Change-Id: I1481c9ce9d08fe7f2bff86d3afdeab7d4002b157
urfaceTexture.cpp
ests/Android.mk
ests/SurfaceTexture_test.cpp
134f0422866e8985188ed10dfbdcb8e6c34b87f7 08-Mar-2011 Jamie Gennis <jgennis@google.com> ANativeWindow: add queues-to-window-composer check.

This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
urfaceTextureClient.cpp
ests/Android.mk
ests/SurfaceTextureClient_test.cpp
9d4d6c101d90d4a1d1ca9413cf3eb89d1f1898d6 27-Feb-2011 Jamie Gennis <jgennis@google.com> Add the MIN_UNDEQUEUED_BUFFERS query to ANW.

This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.

Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
urfaceTexture.cpp
urfaceTextureClient.cpp
e839fdad46c1474368de63626cc07b4ed46cd350 07-Feb-2011 Jamie Gennis <jgennis@google.com> am c7839751: am c2efcd2c: Merge "Initialize the SurfaceTexture transform fields." into honeycomb

* commit 'c7839751aa1de52e0c3aab7dd1518b0fc8f2ee0a':
Initialize the SurfaceTexture transform fields.
f73935bb0da395f5126b67837e815d237dcae5ac 04-Feb-2011 Jamie Gennis <jgennis@google.com> Initialize the SurfaceTexture transform fields.

Change-Id: I2c25f15949253a1dbe493fef440e5ef118c40e71
related-bug: 3426067
urfaceTexture.cpp
08b4ea31a8e265025066ed94b02f08819fac46e5 03-Feb-2011 Jamie Gennis <jgennis@google.com> am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb

* commit '421d94c20321e1de528416b279bf148baba47b39':
Pass the IGraphicBufferAlloc to SurfaceTextureClient.
1b20cde313b5ef8acdace742328df867956d24cb 03-Feb-2011 Jamie Gennis <jgennis@google.com> Pass the IGraphicBufferAlloc to SurfaceTextureClient.

This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects. When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
0eb8851e8cc35f443646000220e42dba3adfab8b 26-Jan-2011 Jamie Gennis <jgennis@google.com> Clear GL errors before updating a SurfaceTexture.

Change-Id: Ibdac657ae9e9ccae53c63abed9caf1f1513915c2
urfaceTexture.cpp
68f9127e88ca6fd849d0f28bcd8776e04aab22e6 29-Jan-2011 Jamie Gennis <jgennis@google.com> Reset ANativeWindow crop on buffer geometry changes.

This changes the ANativeWindow API and the two implementations to reset
the window's crop rectangle to be uncropped when the window's buffer
geometry is changed.

Bug: 3359604
Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
urfaceTextureClient.cpp
749172269ac6b6f7a430e64f604e7f040524e0a1 28-Jan-2011 Jamie Gennis <jgennis@google.com> Quiet the SurfaceFlingerClient dequeueBuffer error.

This is a temporary WAR for the case where dequeueBuffer is called when
all the buffers owned by a SurfaceTexture are not available - either
they're the current texture buffer or the next one. Currently, an error
is returned in that case, and this change just prevents that error from
being logged. In the future this will be fixed to not return an error
in that case.

Bug: 3356050
Change-Id: Ic6cc304881a63ce134cfd0bcb4265e3e3fa94b6a
urfaceTextureClient.cpp
c4d4aeab52435c177ded6abdd578fec8191f0f5d 13-Jan-2011 Jamie Gennis <jgennis@google.com> Implement SurfaceTexture frame-available callback.

This change implements the onFrameAvailable callback for the
SurfaceTexture java class. It includes the C++ SurfaceTexture code as
well as the JNI and Java code to enable the callback.

Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
urfaceTexture.cpp
a214c64d7fb3baf9138cc5314f2111ecf5056c6c 14-Jan-2011 Jamie Gennis <jgennis@google.com> Fix SurfaceTexture transform matrix.

Change-Id: I31520c547cafa5cc85cd0f73883ab3a9ff4648e2
urfaceTexture.cpp
73e8b9e52411785189a35640e3ccb18574e38263 15-Jan-2011 Jamie Gennis <jgennis@google.com> Compare GraphicBuffers using handles.

This change fixes a bug in SurfaceTextureClient where GraphicBuffers
were being compared using pointer comparison rather than handles.

Change-Id: Ib8989af94be32d4efd86e020a732f5143088a863
urfaceTextureClient.cpp
9a78c90cd46b2a3bd637b056873149d3b94384b4 13-Jan-2011 Jamie Gennis <jgennis@google.com> Fix remote GraphicBuffer allocation in SurfaceFlinger.

This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger. This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
urfaceTexture.cpp
e5366c567a49e587879929ed4e5c98425ea17740 13-Jan-2011 Jamie Gennis <jgennis@google.com> Add logging to SurfaceTextureClient.

Change-Id: I984c3b9c88f8af613a50138188ff1b770e2de6b4
urfaceTextureClient.cpp
235c424c9a2e3cc5c24aae8bd9cc6f9db0808b42 12-Jan-2011 Jamie Gennis <jgennis@google.com> Fix a bug in SurfaceTexture::dequeueBuffer.

This change fixes a bug that allowed the most recently queued buffer to
be returned by dequeueBuffer. At the next updateTexImage call, the
dequeued buffer would be set as the contents of the texture even though
the client could be writing to it.

Change-Id: I53dc14eed13262475627d5551337df57fd78fe00
urfaceTexture.cpp
f238e28500ca756fbd9e323f728ce7c8dda59475 10-Jan-2011 Jamie Gennis <jgennis@google.com> Implement crop & transform for SurfaceTexture.

This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class. The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
urfaceTexture.cpp
67eedd74ab78c2bfed9fcdc74947b97289254ca4 09-Jan-2011 Jamie Gennis <jgennis@google.com> Fix a bug in SurfaceTexture::setBufferCount.

We need to reset mCurrentTexture and mLastQueued in setBufferCount
because it frees all of the buffers associated with the buffer slots.

Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
urfaceTexture.cpp
e70d8b43938e17beebcc0c97a9373a1906f6f2bf 09-Jan-2011 Jamie Gennis <jgennis@google.com> Add method logging to the SurfaceTexture C++ class.

Change-Id: Ic05b05428d34c04634ce9fc3f924ff3322bb2da2
urfaceTexture.cpp
3461e0fadff06f77874676a90d4ea12c0405a925 08-Jan-2011 Jamie Gennis <jgennis@google.com> Initialize the SurfaceTexture buffer slots.

Change-Id: I81a562ad897173f33cd6a2127737718a7db610eb
urfaceTexture.cpp
8ba32fade11abb73f3fd47ea0953c9528eb5b91f 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add the SurfaceTexture C++ implementation.

This change adds the C++ implementation of SurfaceTexture and related
classes. The goal of this is for a SurfaceTexture to be passed to
camera service or Stagefright in place of a Surface to allow camera
preview or decoded video frames to be streamed to an OpenGL ES texture
that an application can use.

Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
ndroid.mk
SurfaceTexture.cpp
urfaceTexture.cpp
urfaceTextureClient.cpp
2ffb24799e579c47a73c992ab567f05c4bf0c962 17-Sep-2010 Mathias Agopian <mathias@google.com> Fix typo which causes sensors to fail miserably

Change-Id: Ieca18fc089e2bdf7d049f213836971b54d11cd76
ensorEventQueue.cpp
aeda9afdba5c28d4d152e3ec3bce74be42949065 17-Sep-2010 Mathias Agopian <mathias@google.com> part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work

- In SensorEventQueue, only bail on errors from Looper::loopOnce
- Improve sensor error logging

Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
ensorEventQueue.cpp
59abe7e0909bf4b7bf7b9601e1e40a05f6d4fd8a 14-Sep-2010 Jeff Brown <jeffbrown@google.com> Replace epoll() with poll() and rename PollLoop to Looper.

As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports. That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
ensorEventQueue.cpp
45e0acb41acf30a1b7592ea7e695d96aca3ccd3b 08-Sep-2010 Dianne Hackborn <hackbod@google.com> Modify native ALooper to take an explicit ident.

The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd. This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
ensorEventQueue.cpp
a48bcf62b6a26f24a0bdd2b44bb39fadce499e92 30-Jul-2010 Mathias Agopian <mathias@google.com> Added SensorManager.getMinDelay()

Exposed the new "min delay" sensor property through native and
java sensor apis. This allows the caller to know what is the
maximum rate at which a sensor can return events, or, if a sensor
works in "update" mode (events returned only when the value changes).

Also augmented SensorManager.regusterSensorEvent() so that it can
accept a value in microsecond in addition to the 4 constants already
defined.

Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
ensor.cpp
ensorEventQueue.cpp
d03d9ced3fe0c115bd7af5537cdb57e94e165005 23-Jul-2010 Mathias Agopian <mathias@google.com> Fix a memory corruption when writting Sensor into a parcel

Change-Id: I03f703ae2224f43924031bfea4c68aa979bb9f05
ensor.cpp
e3c8234765050023b8a588607f819e8cc41a6363 22-Jul-2010 Mathias Agopian <mathias@google.com> propagate sensor event rate properly

Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
ensorEventQueue.cpp
a7352c9f4a6e642c29782b19db5bc0bd98feddc8 15-Jul-2010 Mathias Agopian <mathias@google.com> new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
SensorEventConnection.cpp
SensorServer.cpp
ensor.cpp
ensorEventQueue.cpp
ensorManager.cpp
589ce85ee4174829cfedce91b6b2509d2a4002eb 14-Jul-2010 Mathias Agopian <mathias@google.com> first step at implementing the native sensor support

in this commit:
- implemented the C stub
- implemented the binder interfaces involved
- implemented most of the C++ client side

missing:
- SensorManager cannot connect to the SensorServer yet
(because there is no SensorServer yet)

Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b
ndroid.mk
SensorEventConnection.cpp
SensorServer.cpp
ensor.cpp
ensorChannel.cpp
ensorEventQueue.cpp
ensorManager.cpp