• Home
  • History
  • Annotate
  • only in /frameworks/native/include/private/
History log of /frameworks/native/include/private/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4cff88d80bf1acbdbd063af88ecad83a8b9b7b4 14-Nov-2014 Dianne Hackborn <hackbod@google.com> Fix issue #18356768: some app process may hang at Runtime#exit...

...in Parcel destructor

Don't use a Mutux object, just use simple posix mutex primitives,
to avoid static init/destroy order problems.

Change-Id: Ic012d94297564c0a55d58869f8276d7d10545fbc
inder/Static.h
7e790af756d7891cb1cf1374bb283a8fbcbe6b49 11-Nov-2014 Dianne Hackborn <hackbod@google.com> Add tracking of parcel memory allocations.

Change-Id: I76ffed0e69ccfe70e87d98646f11d4de7c3fd980
inder/Static.h
1f6078aef71b1d3f080cd565adbec350c71088dd 27-Jun-2014 Michael Wright <michaelwr@google.com> Have VirtualDisplays send SF resize messages when resizing

Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
ui/LayerState.h
4125a4ffaf374ca9c0773f256998557d3325343e 30-Jan-2014 Andy McFadden <fadden@android.com> Allow "opaque" flag to be updated

Moves the "opaque layer" from Layer to Layer::State. This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
ui/LayerState.h
002e1e58dfe19dd3e49a59c6827cbf51573941a2 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
inder/Static.h
tils/Static.h
ca08833d5ea99130797e10ad68a651b50e99da74 29-Mar-2013 Mathias Agopian <mathias@google.com> don't use compile-time configuration of libgui as much as possible

We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
by the compile-time option
- use KHR_wait_sync if available and either of the above is
enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
ui/SyncFeatures.h
4d9b822e2c18142e55fe2611aa6cd7dc7d4a62c6 13-Mar-2013 Mathias Agopian <mathias@google.com> get rid of ISurface

ISurface was only used to get the IGraphicBufferProducer from
a Layer. It's now replaced by a BBinder subclass / IBinder and
is only used as a handle to the surface, to both refer to it
and manage its life-time.

Also cleaned-up a bit the ISurfaceComposer interface and
"create layer" code path.

Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
ui/LayerState.h
ac9fa427d4a86745e60a5f7fd8e3ea340c4db907 12-Feb-2013 Mathias Agopian <mathias@google.com> get rid of Surface identity and token

we use the IBinder instead.

Change-Id: I4aa0b58869ba43f19980013620051e5a261b062d
ui/LayerState.h
2adaf04fab35cf47c824d74d901b54094e01ccd3 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
ui/LayerState.h
068d47f29dfead847999a7b33b4217ee9514152b 12-Sep-2012 Mathias Agopian <mathias@google.com> strengthen region validation

Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
i/RegionHelper.h
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
ui/ComposerService.h
00e8c7a88a5b9c4104a71013a713acd3e4d3b77b 05-Sep-2012 Mathias Agopian <mathias@google.com> display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
ui/LayerState.h
818b46058aa3006e1d3c178abd36d4f10823f5d9 17-Aug-2012 Mathias Agopian <mathias@google.com> display states can't share the dirty flags

Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
ui/LayerState.h
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
ui/LayerState.h
3165cc21cfea781988407b19bd83292b19f05f55 09-Aug-2012 Mathias Agopian <mathias@google.com> libgui includes refactoring

Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
ui/LayerState.h
c666cae2d5995097ec49a87e375e2afdd92802b7 26-Jul-2012 Mathias Agopian <mathias@google.com> get rid of the shared-memory control block

Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
ui/ComposerService.h
ui/SharedBufferStack.h
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
ui/LayerState.h
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
ui/LayerState.h
6501e9944df131b3b7e293007084735dfa217f24 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
ui/LayerState.h
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
ui/LayerState.h
3aecbb0715cb6928e0530ff1e4caa9c0993cc371 17-Apr-2012 Mathias Agopian <mathias@google.com> fix Region const_iterator.

- it returned an empty rect when the region was empty, instead
of returning an empty list of rect.

- also fixed an infinite loop when boolean_operation was given
an empty list of rects

Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
i/RegionHelper.h
90ac799241f077a7b7e6c1875fd933864c8dd2a7 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
ui/LayerState.h
ui/SharedBufferStack.h
urfaceflinger/LayerState.h
urfaceflinger/SharedBufferStack.h
864d2afbb3b8ffa17b408660624b384b518ef752 26-Feb-2012 Mathias Agopian <mathias@google.com> libagl shouldn't export anything

Change-Id: Ia823dbc56aab2a0b8a6063df4348fe6baac124c6
pengles/gl_context.h
5f2165f9455d4893b581b73a67c5431f4344b47e 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
i/android_natives_priv.h
41f673c9b3aac0d96e41c928845c39186d565212 18-Nov-2011 Mathias Agopian <mathias@google.com> split ComposerService out of SurfaceComposerClient.h

Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
ui/ComposerService.h
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
urfaceflinger/LayerState.h
c2be743a9c366a17d64c6afb5a299664ddfcd32f 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
inder/binder_module.h
698c0873cf2e07bdc7fd1e72169aee2a19fa40d7 29-Jun-2011 Mathias Agopian <mathias@google.com> SF transactions are now O(1) wrt IPC instead of O(N).

Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
urfaceflinger/LayerState.h
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
urfaceflinger/SharedBufferStack.h
75c1535eb3bde60dfa3438083540afddc01e1cec 03-May-2011 Mathias Agopian <mathias@google.com> remove last traces of copybit

Change-Id: Ia0f13a0ee6f702256482b5eb29d7fa2aa840bfc7
pengles/gl_context.h
9cdb01da71934e98b6732db0f5758ea4edd5d5c7 29-Apr-2011 Mathias Agopian <mathias@google.com> get rid of dependency on copybit HAL module

Change-Id: Ia608099a2426c11a91d33063ba53c93e1eccb428
pengles/gl_context.h
acd116daeae2b30f0a221658cb367a9831351af1 01-Mar-2011 Mathias Agopian <mathias@google.com> Add support for up to 32 buffers per Surface

Bug: 3488016

Change-Id: Ie5536ad77d42a4d0e8270e0fd87ecb73471bcbbc
urfaceflinger/SharedBufferStack.h
2bd1d95efecffad447afd682ffe605bbf8c79d62 20-Jan-2011 Mathias Agopian <mathias@google.com> clean-up unneeded code

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.

Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
urfaceflinger/SharedBufferStack.h
0a757814f3e4ca4db772144e85b687fe89a7fba5 09-Dec-2010 Mathias Agopian <mathias@google.com> fix [3259708] Graphic Buffer Mapper does not support YV12

remove a bunch of a code that was there only to support broken gralloc implementations

Change-Id: I3c1a9172224cbcc283601abfbbd695a20815451f
i/sw_gralloc_handle.h
54cc83e8a48c57307cdd40fe4b7e296020490095 02-Nov-2010 Jamie Gennis <jgennis@google.com> Implement reducing the buffer count of a Surface.

Change-Id: I7f979c60c06d654aa8265002836277434bc1a64f
Bug: 3095167
urfaceflinger/SharedBufferStack.h
19957553cbda9134f542e3374c28710d3556d1ce 02-Oct-2010 Mathias Agopian <mathias@google.com> fix [2835280] Add support for cancelling buffers to ANativeWindow

There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.

Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
urfaceflinger/SharedBufferStack.h
0e7f4292c78ef32643fdb10134e91e84067515fc 27-Aug-2010 Mathias Agopian <mathias@google.com> fix a race in SF buffer management

also remove some unused code.

Change-Id: Iae2c3309b7a08055f3e13a5b866c5c084993e352
urfaceflinger/SharedBufferStack.h
b661d66013b9803c50dc78ca0247ac39caef443a 20-Aug-2010 Mathias Agopian <mathias@google.com> fix [2931513] Add support for setting the orientation of an ANativeWindow

Also implement support for cropping.

Change-Id: Iba5888dd242bf2feaac9e9ce26e404c1f404c280
urfaceflinger/SharedBufferStack.h
208cb0772429b9ac800010829ecc7b854bdc2d24 28-Jul-2010 Mathias Agopian <mathias@google.com> fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.

this situation happened when the last buffer needed to be resized
(or allocated, the first time). the assumption was that the buffer
was in use by SF itself as the current buffer (obviously, this
assumption made no sense when the buffer had never been allocated, btw).

the system would wait until some other buffer became the "front" buffer.

we fix this problem by entirely removing the requirement that the
buffer being resized cannot be the front buffer. instead, we just
allocate a new buffer and replace the front buffer by the new one.

the downside is that this uses more memory (an extra buffer) for a
brief amount of time while the old buffer is being reallocated and
before it has actually been replaced.

Change-Id: I022e4621209474ceb1c671b23deb4188eaaa7285
urfaceflinger/SharedBufferStack.h
579b3f88d03d06b897b778bd11818f5104677d1d 09-Jun-2010 Mathias Agopian <mathias@google.com> allow re-targetting of surfaces

Surfaces can now be parcelized and sent to remote
processes. When a surface crosses a process
boundary, it looses its connection with the
current process and gets attached to the new one.

Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0
urfaceflinger/SharedBufferStack.h
b7e930db175c192464cebdeb49eb56cf6dd60114 02-Jun-2010 Mathias Agopian <mathias@google.com> split surface management from surface's buffers management

Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
urfaceflinger/SharedBufferStack.h
7e27f05739c8a2655cf0f7faea35614ce0a50278 28-May-2010 Mathias Agopian <mathias@google.com> more clean-up in preparation of bigger changes

the most important change here is the renaming of
ISurfaceFlingerClient to ISurfaceComposerClient

Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
urfaceflinger/SharedBufferStack.h
631f358d348ea5e7813ca01f86fc9f2a6536add6 26-May-2010 Mathias Agopian <mathias@google.com> fix [2712278] The preview buffer left some black borders in left and bottom edges

we were incorrectly flagging push_buffer surfaces as invalid

Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
urfaceflinger/SharedBufferStack.h
a138f89c5e78b7e8994823e97d6e860869762837 22-May-2010 Mathias Agopian <mathias@google.com> added the notion of fixed-size buffers

the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.

Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
urfaceflinger/SharedBufferStack.h
a0b3f1d2eb796eb90a7576c13890ab8df8516d9d 21-May-2010 Mathias Agopian <mathias@google.com> fix a bug when reallocating a window's buffers is needed

we need to mark the buffers that need to be reallocated,
NOT the buffer's indices.

Change-Id: I809e2e1b03b56c4d2ab983c25523dae99aa1da74
urfaceflinger/SharedBufferStack.h
f10d7fde03218c17251416a34d7b726a43ec528a 21-May-2010 Mathias Agopian <mathias@google.com> added native_window_set_buffer_count()

this method can be used to change the number of buffers
associated to a native window. the default is two.

Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
urfaceflinger/SharedBufferStack.h
bb641244d7d73312dc65b8e338df18b22e335107 19-May-2010 Mathias Agopian <mathias@google.com> fix the threading issue for setBuffercount()

this change introduces R/W locks in the right places.
on the server-side, it guarantees that setBufferCount()
is synchronized with "retire" and "resize".
on the client-side, it guarantees that setBufferCount()
is synchronized with "dequeue", "lockbuffer" and "queue"
urfaceflinger/SharedBufferStack.h
d6297f7d096cee1ce180ac7bc26604a179e742c5 18-May-2010 Mathias Agopian <mathias@google.com> fix some bugs in SharedBufferStack::resize

added buffers should now be labeled properly.

Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
urfaceflinger/SharedBufferStack.h
b5b7f260da2c1a2a82e0311e2015d49a82f43667 08-May-2010 Mathias Agopian <mathias@google.com> SharedBufferStack now can grow up to 16 buffers.

there is a new resize() api, which currently only allows growing.

Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
urfaceflinger/SharedBufferStack.h
c0a9164e9ea5d1d0ee6fbf9ea2ff51318bd78e23 28-Apr-2010 Mathias Agopian <mathias@google.com> Add support for enqueuing buffers in arbitrary order

Also added a very simple SharedBufferStack unit test.

Change-Id: I253dbbe98a53c966b78d22d4d6dd59f8aefc8c40
urfaceflinger/SharedBufferStack.h
b296533607232357597b255679db29470ab5925d 28-Apr-2010 Mathias Agopian <mathias@google.com> cleanup. waitForCondition() now uses polymorphsim instead of templtes

the reason for the above change is that waitForCondition() had become
large over time, mainly to handle error cases, using inlines to
evaluate the condition doesn't buys us much anymore while it increases
code size.

Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
urfaceflinger/SharedBufferStack.h
0a8cd0689a76dbca7405004caac4dde4c0250aea 28-Apr-2010 Mathias Agopian <mathias@google.com> fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly.

in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head'
however there was a race between this and retireAndLock(), which could cause
'tail' to be recalculated wrongly.

the interesting thing though is that retireAndLock() shouldn't have any impact
on the value of 'tail', which is client-side only attribute.
we fix the race by saving the value of 'tail' before dequeue() and restore it
in the case of undoDequeue(), since we know it doesn't depend on retireAndLock().

Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
urfaceflinger/SharedBufferStack.h
cc08e688f5b82b4ebd076ad138b2749e8c86ad5e 16-Apr-2010 Mathias Agopian <mathias@google.com> added setCrop() to android_native_window_t

hooked up the new method up to Surface.cpp
the actual crop is not implemented in SF yet

Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
urfaceflinger/SharedBufferStack.h
1100c8b9012f511d45a82b25c940c702dadbc39e 06-Apr-2010 Mathias Agopian <pixelflinger@google.com> add support for up to 16 buffers per surface

also increase the dirtyregion size from 1 to 6 rectangles.
Overall we now need 27KiB process instead of 4KiB

Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
urfaceflinger/SharedBufferStack.h
9cce325fae8adcf7560a28eef394489f09bad74d 10-Feb-2010 Mathias Agopian <mathias@google.com> split libsurfaceflinger_client and libcamera_client out of libui
urfaceflinger/LayerState.h
urfaceflinger/SharedBufferStack.h
i/LayerState.h
i/SharedBufferStack.h
04a3f57d19b471c21f3c83c50793a94908cafdc7 03-Feb-2010 Mathias Agopian <mathias@google.com> fix [2133133] Software OpenGL ES Lighting is buggy (GL Gears washed out bug)

A typo caused GL_AMBIENT_AND_DIFFUSE to only set the the ambient color.

Fix another typo which caused the viewer position to be wrong for
specular highlights.

Switch back to eye-space lighting, since there are still some issues
with some demos (San Angeles in particular).
pengles/gl_context.h
18b915a1026dfe9d273ee3fd2139b7feed22008c 02-Feb-2010 Mathias Agopian <mathias@google.com> implement [2396050] Add ETC1 texture support to AGL
pengles/gl_context.h
6fee064809068fe1a7da63d55678d9a222b0be15 03-Nov-2009 Mathias Agopian <mathias@google.com> fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video

we lost the concept of vertical stride when moving video playback to EGLImage.
Here we bring it back in a somewhat hacky-way that will work only for the
softgl/mdp backend.
pengles/gl_context.h
38a7fa2ae37236952e5fb0186fddb4f6da5990d8 16-Oct-2009 Mathias Agopian <mathias@google.com> fix [2182249] [MR1] valgrind error in surface flinger
i/RegionHelper.h
e700501d0e888ead9ac6456c0a6fd74d634aa5fb 08-Oct-2009 Mathias Agopian <mathias@google.com> fix [2170319] gmail bulk operation checkbox latency on passion

This also fixes [2152536] ANR in browser

When SF is enqueuing buffers faster than SF dequeues them.
The update flag in SF is not counted and under some situations SF will only
dequeue the first buffer. The state at this point is not technically
corrupted, it's valid, but just delayed by one buffer.

In the case of the Browser ANR, because the last enqueued buffer was delayed
the resizing of the current buffer couldn't happen.

The system would always fall back onto its feet if anything -else- in
tried to draw, because the "late" buffer would be picked up then.
i/SharedBufferStack.h
i/SurfaceFlingerSynchro.h
9ec430adaea1cb88eaa1e78c7f759cd42ab6cf7a 07-Oct-2009 Mathias Agopian <mathias@google.com> fix [2152536] ANR in browser

A window is created and the browser is about to render into it the
very first time, at that point it does an IPC to SF to request a new
buffer. Meanwhile, the window manager removes that window from the
list and the shared memory block it uses is marked as invalid.
However, at that point, another window is created and is given the
same index (that just go freed), but a different identity and resets
the "invalid" bit in the shared block. When we go back to the buffer
allocation code, we're stuck because the surface we're allocating for
is gone and we don't detect it's invalid because the invalid bit has
been reset.

It is not sufficient to check for the invalid bit, I should
also check that identities match.
i/SharedBufferStack.h
b26af23744fa73e8bc142b1eb98772fde5970c10 06-Oct-2009 Mathias Agopian <mathias@google.com> fix [2168531] have software-only gralloc buffer side-step the HAL
i/sw_gralloc_handle.h
3330b203039dea366d4981db1408a460134b2d2c 06-Oct-2009 Mathias Agopian <mathias@google.com> fix [2167050] glTexImage2D code path buggy in SurfaceFlinger

When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.

Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.

This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.
i/SurfaceBuffer.h
i/android_natives_priv.h
0b3ad46a26dc3717260fa9347c77f673f3198606 03-Oct-2009 Mathias Agopian <mathias@google.com> Attempt to fix [2152536] ANR in browser

The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable.
When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return
immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT.

This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status
in all code paths where a surface is removed from the list.

Additionaly added more information in the logs, should this happen again.
i/SharedBufferStack.h
86f7329080cbb6f70d56278b005c820f0360d84b 17-Sep-2009 Mathias Agopian <mathias@google.com> add basic time stats for surfaces lock time
i/SharedBufferStack.h
c7d56010815b0e7104dfc1d4bba6d16cdcbffec4 15-Sep-2009 Mathias Agopian <mathias@google.com> make sure to update the tail pointer when undoing a dequeue
i/SharedBufferStack.h
48d819a1315f7d1b5abfec9d4fd34fb5aed27b1d 11-Sep-2009 Mathias Agopian <mathias@google.com> fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore

this also fixes part of [2111536] Device is soft rebooted after ending the call through voice dialer
i/SharedBufferStack.h
b58b5d72d6877300fe39b2a30b4742c6f962833f 11-Sep-2009 Mathias Agopian <mathias@google.com> make sure conditions will return when the status of a surface is not NO_ERROR
i/SharedBufferStack.h
cbb288bfe89f585bf48371bd31b2d4aafa32f32e 08-Sep-2009 Mathias Agopian <mathias@google.com> fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly

Rewrote SurfaceFlinger's buffer management from the ground-up.
The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice.

The main new feature is to be able to dequeue all buffers at once (very important when there are only two).

A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued.

The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time.

eg. Allowed sequence: DQ, DQ, LOCK, Q, LOCK, Q
eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
i/LayerState.h
i/SharedBufferStack.h
i/SharedState.h
i/SurfaceBuffer.h
e03eaa1551a644e9a13c327d16cc09bfd7649d78 11-Aug-2009 Martin Storsjo <martin@martin.st> Calculate specular lighting correctly

Since the lighting calculations are done in object space, the vector
from the object to the viewer also needs to be transformed to object
space.
pengles/gl_context.h
238a66e67b155d7e1fcdb19b672ffc0ae4a6fc94 14-Aug-2009 Mathias Agopian <mathias@google.com> be more friendly with C
i/android_natives_priv.h
eb9fd685f8c02384305d57d17b1bca428c7b2dd9 14-Jul-2009 Mathias Agopian <mathias@google.com> add a ctor to Mutex to specify the type, which can be shared. This is used by sf and af an soon will allow some optimization in the kernel for non shared mutexes
i/SharedState.h
ec0f1f6720cd7ecffab54b0dfc2553b55a38e50f 13-Jul-2009 Mathias Agopian <mathias@google.com> implement Mutex and Condition with pthread instead of calling futex directly.

internally pthread uses futex. the implementation consists of simple inlines
there are no implementation files anymore.
tils/futex_synchro.h
e7c4c28d0fe9b62eacaa04d901464e501e511265 07-Jul-2009 Mathias Agopian <mathias@google.com> add a virtual destructor to region_rasterizer, to be on the safe side
i/RegionHelper.h
4c4b387afb2e775fcac3b81a249bb7646515dffa 25-Jun-2009 Mathias Agopian <mathias@google.com> merge master in master_gl
952663ef57ffa8a69a220856eb1679c4e9eca254 23-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 5277103d: Merge change 5035 into donut

Merge commit '5277103db9033226814edc8fcba6f4ba4e846678'

* commit '5277103db9033226814edc8fcba6f4ba4e846678':
add glTexParameteri() and fix glTexParameteriv()
b12f99b31528a9ab9aa8f5c9fcfb57ad4c8b0517 23-Jun-2009 Mathias Agopian <mathias@google.com> add glTexParameteri() and fix glTexParameteriv()
pengles/gl_context.h
0a3139a21e628093893bba8ca0bb0b4742e0522c 11-Jun-2009 Mathias Agopian <mathias@google.com> fix a bug where copybit only renders in the first buffer when used with s/w GL
pengles/gl_context.h
7e2a937c4fa91e7c048fdbc37fe2a8dd85361df9 10-Jun-2009 Mathias Agopian <mathias@google.com> revive the copybit test.
i/SurfaceBuffer.h
0c97ed3a2ecc4a5b49bfb26674a9f4a5ac361024 05-Jun-2009 Mathias Agopian <mathias@google.com> cleanup Debug.h a bit
i/SharedState.h
310f8da0c3122ed5419db8f12a6e98d3188325b2 22-May-2009 Mathias Agopian <mathias@google.com> merge master to master_gl
c5b2c0bf8007562536b822eb060fc54a01f8e08b 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
inder/Static.h
tils/Static.h
208059f67ed2dd9fa025e07fcb6954d3cb61c79e 19-May-2009 Mathias Agopian <mathias@google.com> checkpoint: split libutils into libutils + libbinder
inder/Static.h
inder/binder_module.h
tils/Static.h
tils/binder_module.h
20f68782a4ea71c6a977d7f87d8288d3daa265ec 11-May-2009 Mathias Agopian <mathias@google.com> Region now has its own implementation instead of relying on SkRegion, which allows us to break libui's dependency on libcorecg.
i/RegionHelper.h
58a79f47457e9cae2f6880653b581fe3170b0b1f 06-May-2009 Mathias Agopian <mathias@google.com> move android_native_buffer_t declaration into its own private/ui/android_native_priv.h header, since user code should never have access to it.
i/SurfaceBuffer.h
i/android_natives_priv.h
7189c0054e29a66d945f5657c48d5ecf538ea511 06-May-2009 Mathias Agopian <mathias@google.com> move opengl/include/EGL/android_natives.h to include/ui/egl/android_natives.h and don't include it from egl.h

the android_native_ types are just forward declared in egl.h
i/SurfaceBuffer.h
f1d8e87b09abf963cd5b6a026194c1940fadb7b4 21-Apr-2009 Mathias Agopian <mathias@google.com> a brand new MessageQueue for SurfaceFlinger.
i/SurfaceFlingerSynchro.h
076b1cc3a9b90aa5b381a1ed268ca0b548444c9b 10-Apr-2009 Mathias Agopian <mathias@google.com> Integrate from //sandbox/mathias/donut/...@145728

SurfaceFlinger rework for new EGL driver model support.
pengles/gl_context.h
i/SharedState.h
edbf3b6af777b721cd2a1ef461947e51e88241e1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
pengles/gl_context.h
i/LayerState.h
i/SharedState.h
i/SurfaceFlingerSynchro.h
tils/Static.h
tils/binder_module.h
tils/futex_synchro.h
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
pengles/gl_context.h
i/LayerState.h
i/SharedState.h
i/SurfaceFlingerSynchro.h
tils/Static.h
tils/binder_module.h
tils/futex_synchro.h
a6938bab1f6fa76ae98ebbe44f4e534e05fa0993 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
pengles/gl_context.h
8a7a67538a9977c892389bfcde76a8372aa0b56c 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
pengles/gl_context.h
e09fd9e819c23dc90bca68375645e15544861330 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
pengles/gl_context.h
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
pengles/gl_context.h
i/LayerState.h
i/SharedState.h
i/SurfaceFlingerSynchro.h
tils/Static.h
tils/binder_module.h
tils/futex_synchro.h