History log of /frameworks/native/services/surfaceflinger/DisplayDevice.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c3ebe66b49cfba035e1fd0e160a13db38eb81b0e 05-Sep-2014 Riley Andrews <riandrews@google.com> Add rotation to surfaceflingers screen cap.

+ This is needed so that activity manager does not
have to do cpu side rotations when capturing recents

Change-Id: If998008e675ad01305db8399fd643cf4608b7025
d4548dd0272f5a4edee1d7ff070458728848b35c 20-Aug-2014 Jesse Hall <jessehall@google.com> am 514e30a9: am c3d1889e: Merge "surfaceflinger: skip composition for empty frames" into klp-modular-dev

* commit '514e30a96cefad109509ce01622fa7f82f3f318c':
surfaceflinger: skip composition for empty frames
514e30a96cefad109509ce01622fa7f82f3f318c 20-Aug-2014 Jesse Hall <jessehall@google.com> am c3d1889e: Merge "surfaceflinger: skip composition for empty frames" into klp-modular-dev

* commit 'c3d1889e508038efe240ed1974ed377a2e12835c':
surfaceflinger: skip composition for empty frames
f2568dea419562ad75b2e79dcbd358af34e9f8ad 20-Aug-2014 Michael Lentine <mlentine@google.com> Destroy eglSurface before recreating.

Bug: 16856208

Change-Id: Ifb5c8997afab4bc922356a3542d1f899a2546855
b7a0549c983bef103ce07eb3af5905febc6e538e 15-Aug-2014 Jesse Hall <jessehall@google.com> surfaceflinger: skip composition for empty frames

By not committing the results of composition for empty frames, we
avoid spitting out series of black frames for virtual displays that
don't have visible layers. We still draw one black frame when going
from having layers to not having any. In particular, this avoids
having a series of empty frames due to re-compositing the primary
display in the period between creating the virtual display and adding
layers to it.

Bug: 16786752
Change-Id: I7e9b2ed2e407d8d49c7af736b447d4c6181b0ad8
47e45405d1533aa73307014f7bf371e118695cf3 19-Jul-2014 Michael Lentine <mlentine@google.com> Allow for resizing of Virtual Displays.

Modify SurfaceFlinger to use VirtualDisplaySurface in all cases when a virtual
display is used. Add functionality in VirtualDisplaySurface to resize the
buffers aquired in the QueueBufferOutput. Add transaction support in
SurfaceFlinger for resize. Add the modification of the size in DisplayDevice.

Change-Id: Iae7e3556dc06fd18d470adbbd76f7255f6e6dd6b
Tested: None
6c9e34a98a63033b80bd1c24c7aa1304f912f10a 14-Jul-2014 Michael Lentine <mlentine@google.com> Modified SurfaceFlinger to implment setActiveConfig and getActiveConfig.

This can be used to change the current display mode of the device.

Change-Id: Icdc3fb58389b861dc77b68102083da6f7a96eccb
Tested: None
(cherry picked from commit 2651fa94635a96d653038fb389a0dd827338f8d3)
2c9b11f0291210c9b9513a1a0cce6afebd361b3b 25-May-2014 Prashant Malani <pmalani@google.com> surfaceflinger: Replace blank/unblank with setPowerMode

We replace the blank/unblank calls in surfaceFlinger with a more generic
setPowerMode() routine.

Some displays support different power modes (for example, with reduced
color palettes). Depending on the use case we should be able to toggle
these modes, so as to achieve incremental power savings.

Initially, three power modes will be supported:

HWC_POWER_MODE_OFF will correspond to blanking the display, while
HWC_POWER_MODE_NORMAL will correspond to unblanking. HWC_POWER_MODE_DOZE
will put the display into a low power setting, if it is supported in

If such a low power mode is not supported, it should be treated as a
call to set the mode to HWC_POWER_MODE_NORMAL.

As a consequence of adding the mPowerMode field, the mScreenAcquired is
no longer required, and thus references to it are removed and replaced
equivalent references to mPowerMode.

We also add the glue code to connect the services invocation of setting
a power mode and the HAL implementation in HWComposer.

Bug: 13472578
Change-Id: I431595ecf16d2f2c94259272db3dd42f29636204
Signed-off-by: Prashant Malani <pmalani@google.com>
c18790018be5d7ea7061ccbc81f3044e74adc823 23-May-2014 Dan Stoza <stoza@google.com> SurfaceFlinger: Add sourceCrop to screenshot

Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
bba1385d1cfdbe80d7e5f441d943edd4c5708eca 23-Apr-2014 Dan Stoza <stoza@google.com> am f3c07d4f: Fix virtual display nesting

* commit 'f3c07d4f70f33c2fe5b14ca8fbcdfa4133cc72c7':
Fix virtual display nesting
f3c07d4f70f33c2fe5b14ca8fbcdfa4133cc72c7 05-Feb-2014 Dan Stoza <stoza@google.com> Fix virtual display nesting

This fixes the cycling rendering loop caused by nesting virtual
displays by preventing them from recomposing if their contents
haven't changed.

(cherry-pick from master I600365c0fd5d3ad93e04295d26cf9de177ffc79b)

Bug: 12101046
Change-Id: I6182993d53537781aedb522f97a50f06eed8b80f
55886cb12828a2cb57b82efaf30050ea9dc418bb 08-Mar-2014 Greg Hackmann <ghackmann@google.com> am 7429e4f7: am 112aa42e: Merge "SurfaceFlinger: fix 64-bit format string warnings"

* commit '7429e4f7d43cd42563ce77a3a4a861a392bc750f':
SurfaceFlinger: fix 64-bit format string warnings
86efcc0cbc1d94250b72ef1f2ea8700a04cd2781 07-Mar-2014 Greg Hackmann <ghackmann@google.com> SurfaceFlinger: fix 64-bit format string warnings

Change-Id: Idacfbf0601743fba1c5de7632201a66a307a2710
Signed-off-by: Greg Hackmann <ghackmann@google.com>
a9d27063a1d5586116acb50c5a37ff29684993eb 25-Feb-2014 Jesse Hall <jessehall@google.com> am 9d65631f: am c9bf3ba4: Merge "Virtual Display async mode is overridden"

* commit '9d65631f5de153b50331d9f63225fe60ba70f8bc':
Virtual Display async mode is overridden
4ee5696dfbcea1078b24e7c089de74e7cf4e55ca 21-Feb-2014 John Dong <johnd@broadcom.com> Virtual Display async mode is overridden

Virtual Display async setting is overridden by eglApi.c causing
stall during composition.

Set the async mode after eglCreateWindowSurface()


Change-Id: I336ca145552e387217cd8bea6e4b7f5f490a274d
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
c701401f8cec2e5309f8b57e2b97baced5093274 15-Feb-2014 Dan Stoza <stoza@google.com> Allow disabling layer rotation during screenshots

Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.

Bug: 11805195
Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
7143316af216fa92c31a60d4407b707637382da1 05-Feb-2014 Dan Stoza <stoza@google.com> Fix virtual display nesting

This fixes the cycling rendering loop caused by nesting virtual
displays by preventing them from recomposing if their contents
haven't changed.

Bug: 12101046
Change-Id: I600365c0fd5d3ad93e04295d26cf9de177ffc79b
19e872912af66c53a4350afcc333bbafaf6a2294 24-Dec-2013 Jesse Hall <jessehall@google.com> Implement per-display EGLConfig and configless EGLContext

Bug: 12230666
Change-Id: Icca608b108cbdcab9cf01a9236d8cdbda000a836
Signed-off-by: Jesse Hall <jessehall@google.com>
c1c05de415854eb7a13a16b7e22a22de8515123a 18-Sep-2013 Mathias Agopian <mathias@google.com> fix camera API 2.0 orientation

we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
83cafffeac037ab2f9d00f98f8d2f3da8fc9b857 17-Sep-2013 Jesse Hall <jessehall@google.com> Stop using default value for Surface producerControlledByApp parameter

Bug: 10785749
Change-Id: Ifbf9340e5eabe621a69e990ec3e05ac51f8db66a
931bda1c472ba8c8e965bdba6757ff94154df903 29-Aug-2013 Mathias Agopian <mathias@google.com> reset the gl viewport at each frame for each display

Bug: 10097128, 9506003
Change-Id: Ie0403a631e339a9134216224f3366f46ece58b53
d2cf8c2f07b4285a224acd262e6f052c37dbc0b0 21-Aug-2013 Jesse Hall <jessehall@google.com> Merge "Provide HWC prepare with a valid output buffer" into klp-dev
028dc8f2d72bc7cd4fbe7808781443125a742f78 21-Aug-2013 Jesse Hall <jessehall@google.com> Provide HWC prepare with a valid output buffer

We weren't dequeing and setting the output buffer until just before
set(). This didn't allow HWC to make decisions in prepare() based on
the output buffer format, dimensions, etc.

Now we dequeue the output buffer at the beginning of the composition
loop and provide it to HWC in prepare. In GLES-only rendering, we may
have to cancel the buffer and acquire a new one if GLES requests a
buffer with properties different than the one we already dequeued.

Bug: 10365313
Change-Id: I96b4b0a851920e4334ef05080d58097d46467ab8
22a99f0fc2884227b9d7e46959fcbe6270667efb 21-Aug-2013 Andy McFadden <fadden@android.com> Fix virtual displays for HWC 1.0

We weren't swapping the buffers.

Bug 10366404

Change-Id: I43eb7648231bedf24899da6fc0d9acc09e0b047e
3f84483382be2d528918cc1a6fbc6a7d68e0b181 08-Aug-2013 Mathias Agopian <mathias@google.com> SurfaceFlinger now uses GLES 2.x when available

Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
ff866e7642033d8f68c11eaa16d0afcecf0bab5b 07-Aug-2013 Jesse Hall <jessehall@google.com> Merge "Set the swap interval of virtual display surfaces to 0"
f460f55c84b0a75de749b8a784059f5ff423ed93 07-Aug-2013 Jesse Hall <jessehall@google.com> Set the swap interval of virtual display surfaces to 0

This prevents slow/malicious virtual display consumers from
backpressuring SurfaceFlinger and preventing it from updating other

Bug: 10193714
Change-Id: I3e877d97202628d2d9abea24b66576f38299c14d
db89edc94bd2a78226b407f9f7261e202e7fa325 02-Aug-2013 Mathias Agopian <mathias@google.com> All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
38efe86d9459cf5c96a24a34cc5cbf31fdba7e19 07-Apr-2013 Jesse Hall <jessehall@google.com> Rewrite VirtualDisplaySurface

The previous implementation assumed that the HWC could read and write
the same buffer on frames that involved both GLES and HWC composition.
It turns out some hardware can't do this. The new implementation
maintains a scratch buffer pool to use on these mixed frames, but on
GLES-only or HWC-only frames still does composition directly into the
output buffer.

Bug: 8384764
Change-Id: I7a3addb34fad9bfcbdabbb8b635083e10223df69
875d8e1323536e16dcfc90c9674d7ad32116a69a 08-Jun-2013 Mathias Agopian <mathias@google.com> Refactor SF. Move all GL operations in their own class.

this is the first step to add support for GLES 2.x, this
change breaks the dependency of SF on GLES 1.x by moving
all operation into their own class.

Bug: 8679321

Change-Id: I0d2741eca2cefe67dfd9cf837cac10c4d126928b
6c7f25afb75ac155bad0b3bc17c0089d0337d060 10-May-2013 Mathias Agopian <mathias@google.com> reformat Rect.{cpp|h}

Change-Id: I45b1f6646541a1abacce1e70df00a770e47b820e
74d211ae26a0257c6075a823812e40b55aa1e653 22-Apr-2013 Mathias Agopian <mathias@google.com> clean-up/simplify all dump() APIs

remove the scratch buffer parameter and use
String8::appendFormat() instead.

Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
02d86567d95b99e1142941ed7ec23a4465822813 25-Mar-2013 Jesse Hall <jessehall@google.com> Clean up HWC state when releasing a DisplayDevice

DisplayDevices can be released when DisplayManager removes them from
the display list, or (for virtual displays) when the surface is set to
NULL. We were only cleaning up HWC resources associated with the
display in the first case.

Bug: 8384764
Change-Id: Id3d226dd7178fbe6d0a2ac4e2660b864ee073de3
ffe1f19ca9707f84cb9fdb06209bf36cd8c2ef0a 22-Mar-2013 Jesse Hall <jessehall@google.com> Fix virtual displays for HWC<=1.1

If we're using a HWC that doesn't support virtual displays, or we have
more virtual displays than HWC supports concurrently, the
VirtualDisplaySurface should simply be a passthrough from source
(GLES) to sink.

This change also tries to distinguish between display types and HWC
display IDs a little better, though there's more to do here. Probably
needs a higher-level rethink; it's too error-prone now.

Bug: 8446838
Change-Id: I708d2cf262ec30177042304f174ca5b8da701df1
851cfe834295224cd64bdd499872b95b19c4de8c 20-Mar-2013 Jesse Hall <jessehall@google.com> Isolate knowledge that fb target == output buffer

HWComposer didn't allow the virtual display output buffer to be set
directly, instead it always used the framebuffer target buffer.
DisplayDevice was only providing the framebuffer release fence to
DisplaySurfaces after a commit.

This change fixes both of these, so both HWComposer and DisplayDevice
should continue to work if VirtualDisplaySurface changes to use
separate framebuffer and output buffers. It's also more correct since
VirtualDisplaySurface uses the correct release fence when queueing the
buffer to the sink.

Bug: 8384764
Change-Id: I95c71e8d4f67705e23f122259ec8dd5dbce70dcf
13f01cbdbd34779a234bc674df79e23672fd5c0b 20-Mar-2013 Jesse Hall <jessehall@google.com> Pass sp<Fence>s around instead of file descriptors

Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
7414965606f82ac2bcace5d3e2c8a4810517bf1e 20-Mar-2013 Jesse Hall <jessehall@google.com> Release virtual display buffer immediately after HWC set

Previously we only queued a virtual display buffer to the sink when
the next frame was about to be displayed. This may delay the "last"
frame of an animation indefinitely. Now we queue the buffer as soon as
HWC set() returns and gives us the release fence.

Bug: 8384764
Change-Id: I3844a188e0f6ef6ff28f3e11477cfa063a924b1a
99c7dbb24994df2f3e175f7b25dd2c9dd92a72f0 14-Mar-2013 Jesse Hall <jessehall@google.com> Add DisplaySurface abstraction

DisplayDevice now has a DisplaySurface instead of using
FramebufferSurface directly. FramebufferSurface implements
DisplaySurface, and so does the new VirtualDisplaySurface class.
DisplayDevice now always has a surface, not just for virtual displays.

In this change VirtualDisplaySurface is just a stub; buffers still go
directly from GLES to the final consumer.

Bug: 8384764
Change-Id: I57cb668edbc6c37bfebda90b9222d435bf589f37
7adb0f8a9fdb961692ffd2f0c65cacb155143f64 07-Mar-2013 Jesse Hall <jessehall@google.com> Minor cleanups/fixes before virtual display refactoring

None of these should change behavior, except for removing some
incorrect log messages when using a virtual display.

- HWComposer::getAndResetReleaseFenceFd() checks the HWC version, so
no need to do that in the DisplayDevice::onSwapBuffersCompleted().
However, it should check that mFramebufferSurface is not NULL like
it is for virtual displays.
- Comment that FramebufferSurface::dump() overrides the non-virtual
ConsumerBase::dump(), and fix it so the right thing happens
regardless of the static type of the pointer/reference the callee
has. FramebufferSurface::dump() could be removed right now, but I'd
need to bring it back in a later change.
- Use the right enum for validating display type ids.
- Don't try to send hotplug events for virtual displays.
- Mark virtual displays as connected so HWComposer::prepare() doesn't
think something is wrong when it gets a non-NULL layer list.
- Remove unused FramebufferSurface methods.

Bug: 8384764
Change-Id: Id28a2f9be86b45f4bb7915fdf7752157035f4294
13127d8921356dff794250e04208c3ed60b3a3df 06-Mar-2013 Mathias Agopian <mathias@google.com> Get rid of LayerBase.

The functionality of LayerBase and Layer is folded
into Layer. There wasn't a need for this abstraction

Change-Id: I66511c08cc3d89009ba4deabf47e26cd4cfeaefb
eabe3140f11e515639e7a70a1286dd6af7352c9e 05-Mar-2013 Jesse Hall <jessehall@google.com> Merge "Init displays to null layer stack" into jb-mr2-dev
01e29054e672301e4adbbca15b3562a59a20f267 20-Feb-2013 Jesse Hall <jessehall@google.com> Init displays to null layer stack

When a display is added, initialize it to use an empty layer stack, so
if it is somehow visible it will show black. It will be assigned the
real layer stack -- along with a projection and other properties -- by
window manager soon. Normally a display remains blanked until window
manager has decided what to show on it, but for HDMI connected at boot
that isn't currently the case.

Bug: 7258935
Change-Id: Ic9bb25f7a9b8d9d3772b097ab1d6fa03bc8780a1
f5f714aa188884098aaecbe39d0bc61b40311c0d 27-Feb-2013 Mathias Agopian <mathias@google.com> apply the projection's viewport to the visibleregion passed to hwc

each desplay's projection's viewport essentially clips each layer,
so this should be reflected in the visibleregion passed to
h/w composer.

DisplayDevice getViewport and getFrame are now guaranteed to return
valid Rects.

Change-Id: I4c25f34fb26af10179eb26d429ca6c384c671e91
e3c697fb929c856b59fa56a8e05a2a7eba187c3d 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
7dd35a165d7b689c8a2c79b4e136669103b32232 14-Jan-2013 Jesse Hall <jessehall@google.com> am fc866eb8: am 845ed8fd: Merge "DisplayDevice: initialize mDisplayToken correctly"

* commit 'fc866eb8423cd1d720683946f7d102547718b6c9':
DisplayDevice: initialize mDisplayToken correctly
27e2562868dcd3ad26f9b4677b64ae272941704e 07-Jan-2013 Chih-Wei Huang <cwhuang@android-x86.org> DisplayDevice: initialize mDisplayToken correctly

mDisplayToken should be initialized by displayToken.

Change-Id: I0a5fec1f1732200a32d10b1575239dceffe6dee4
766dc49c17dda977bf7b93a5fd8da41c0b737611 31-Oct-2012 Mathias Agopian <mathias@google.com> rework a bit how we scissor the display

the scissor rect is now computed once by DisplayDevice
and is combined with the "undefined" region so that
the letter-boxed area of the screen get cleared in

Bug: 7149437
Change-Id: Id2f30516a5786f32eace7f876ff32028f954f357
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
b8fc00bfb41a61aeda186eec8f14522ff32f23f8 10-Oct-2012 Mathias Agopian <mathias@google.com> fix typo that prevented proper loging of EGL error code

needed for investigating 7309949

Bug: 7309949
Change-Id: If29a5c08d0e87f46b44ba2e1030be61cb4d1403b
135e5899f70a67e62baaf6dbec7ba2ce611ca16a 01-Oct-2012 Mathias Agopian <mathias@google.com> save/restore viewport properly when taking screenshot

Bug: 7241739
Change-Id: Iba8b9ffc75ab47fbc56169e65da26d96850a9297
bae92d0d605e99a14731add4f11b72413b2835e5 28-Sep-2012 Mathias Agopian <mathias@google.com> reset GL viewport and project when caputring the screen

Bug: 7241739
Change-Id: I3bb5214b070384de9be2026647865c6c236a4331
32341381c9493d7953e40f7f79653cfc52868863 26-Sep-2012 Mathias Agopian <mathias@google.com> only abort when errors happen on the main display

Bug: 7232690
Change-Id: I2c4b35a82f131da26deea738ef294e100e536d15
52e21483fa48baeb4a88372d75e083bca2e92923 25-Sep-2012 Mathias Agopian <mathias@google.com> handle EGL errors

for now we just restart the runtime.

bug: 7225248
Change-Id: I7638ffe82075a4db9e7e6f9e35cf48afcb5a387a
9e2463e71796964cfaa06bf09a880875ac3537bc 22-Sep-2012 Mathias Agopian <mathias@google.com> add/remove displays properly on hotplug events

Bug: 7191563
Change-Id: I8f0fbf3b29658c9479443141798e6f288a1f2d52
eba8c688f633f3f3f1b75c2bc64faf799dd2b5f2 20-Sep-2012 Mathias Agopian <mathias@google.com> calculate wether we filter on a per-display basis

Change-Id: I79d80b432b20b3d02428da19add464ac1e2b9378
d56eff2f49e64bb71863ffb866af8c3f686b96e9 20-Sep-2012 Mathias Agopian <mathias@google.com> fix typo in DisplayDevice logs

Change-Id: I593ef674f12073bd9d690946447031394ef9044e
1d12d8a8e61163b35cf42c51c558a67138014e82 18-Sep-2012 Mathias Agopian <mathias@google.com> improve logging of external displays

Change-Id: I041aebb7fc655aeca98bbf698d15e05d7c12cac9
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
d870703d5566490cfdfb389d9336b2b8d3c6cc7a 18-Sep-2012 Mathias Agopian <mathias@google.com> fix external displays

we were not calling eglSwapBuffers() on external displays
because they can't use HWC which caused us to think they
didn't have GLES composition.

Change-Id: I6cef4ae40b138412d2e6f2acda33c9d222b03a83
da27af9832a0170f1fc40ef3f21371c4d30d21b3 14-Sep-2012 Mathias Agopian <mathias@google.com> add support hwc 1.1

Bug: 7124069

Change-Id: I53d705105c4ad8954d3f50ee4f4c8b7ec936b871
6e220a6ce6971555b883f4852c6e5d4c7a617815 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix display projections when translated.

There are two different translations to apply in the logical
orientation, one before scaling and one after.
So translate, scale, translate then rotate.

Bug: 7139798
Change-Id: I0726991cadb62988390e77503dbbaed54f07bfe3
6360ec42d414b1351ecb6c5fc4b8afa30d8f4ebf 12-Sep-2012 Jesse Hall <jessehall@google.com> Fix display projection transforms

Bug: 7139798
Change-Id: I61aafe99180d85563c6880d16bc367fce80e6022
00e8c7a88a5b9c4104a71013a713acd3e4d3b77b 05-Sep-2012 Mathias Agopian <mathias@google.com> display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
da8d0a5c0cf9d41915d3b106cad4aaec3e767c11 05-Sep-2012 Mathias Agopian <mathias@google.com> implement display viewport and frame

note: viewport clipping is not implemented yet

Change-Id: I7fde7c4de075d409d95c48bb20ba8ee017f6f00a
3ee454a7bef8bd3d1c9cdd9d17108eb80ebadf2a 28-Aug-2012 Mathias Agopian <mathias@google.com> Eradicate DisplayID.

DisplayDevices are now keyed of the wp<IBinder> the client uses.
DisplayID has now become DisplayType which is just used to identify
physical displays (as opposed to virtual displays such as wifi displays).

Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
e60b0687c8d49871d0c8786cabe6851f7a7783b5 22-Aug-2012 Mathias Agopian <mathias@google.com> HWComposer now has its own concept of display IDs

HWComposer can now create IDs representing a display
it can deal with. IDs MAIN and HDMI are reserved.
SurfaceFlinger associate HWComposer IDs with a
DisplayDevice and uses that when it talks to HWComposer.

A DisplayDevice doesn't have to have a HWComposer ID,
in that case it just can't use h/w composer composition.

Change-Id: Iec3d7ac92e0c22bf975052ae2847402f58bade71
cd60f99aba9e750700a967db30b74a29145739cf 17-Aug-2012 Mathias Agopian <mathias@google.com> refactor compositing code to avoid multiple eglMakeCurrent() calls

when multiple displays are connected, we ended-up having to
call eglMakeCurrent() twice per display due to a limitation
in EGL. this fixes that.

Change-Id: I11e4584df50f8c24bbecee74e37b28b3ee031d2f
5f20e2d4462da3471f59152b32cd8640fa4a21da 11-Aug-2012 Mathias Agopian <mathias@google.com> reimplement wifi display hack with new external display SF framework

fix a few bugs with external displays

- HWComposer doesn't really handle multiple displays yet
so there is a lot of ugliness there

- We also need to make sure that external displays are not
blanked by default

- due to some EGL limitations surfaces being swapped need
to be current

Change-Id: I82bff05b43bcebd8da863c7c76b4edbc3bc223a9
8b736f138cfd9b239a2c7073347a13c489534ae1 14-Aug-2012 Mathias Agopian <mathias@google.com> xdpi / ydpi were reported as 0

Bug: 6975723
Change-Id: Ia7fa37ec11e2308804f5034959a37e508d292d31
ef7b9c7eac036cc1230c64821039d18f8cbd2c1c 11-Aug-2012 Mathias Agopian <mathias@google.com> screenshots could stop working after camera was used

once a secure window is put on screen the display
would retain its "secure" flag forever, preventing
screenshots from being taken.

Bug: 6933967
Change-Id: I5be8355145ca7d580d84552311642f8fa912fe6a
3165cc21cfea781988407b19bd83292b19f05f55 09-Aug-2012 Mathias Agopian <mathias@google.com> libgui includes refactoring

Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
28947d7fbf9f486539322e8e12dd057568e180c2 09-Aug-2012 Mathias Agopian <mathias@google.com> now able to set the layer stack on a DisplayDevice

Change-Id: Ia9691cf221b9444c243eb468d9e276a30e600b6b
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
4297734c1156fd8ede7e9c61b1e439f9e1c18cd9 05-Aug-2012 Mathias Agopian <mathias@google.com> turn DisplayDevice into a reference-counted object

it's safer this way because this object owns an
EGLSurface which cannot be easily reference-counted.

it also gives us the ability to sub-class it, which
we might want to do soon.

Change-Id: I07358bb052dc5a13b4f2196b2c2b6e6e94c4bb4f
d8552d796cbcb9a89711fc8f97b34838da5cbdb7 05-Aug-2012 Mathias Agopian <mathias@google.com> DisplayDevice only needs ANativeWindow not SurfaceTextureClient

Change-Id: Ib5be5af8bede435c8d5d9fabf586d28d0e74c2cb
888c822c4cb6976aab9256c58bae9e17e3e55c5c 05-Aug-2012 Mathias Agopian <mathias@google.com> remove a dependency of DisplayDevice on the refresh rate

this remove a dependency (not all) on FramebufferSurface

Change-Id: Ie07ce70760cdcedfb41b5b41bea8da45637bf474
92a979a92c34b7de609ce2b1662c73bb8a2728b9 03-Aug-2012 Mathias Agopian <mathias@google.com> We now have a real list of displays.

displays can be dynamically added or removed, and the
list is part of the SF's transaction.

Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
d3ee231eddce0b69ec5e35188dbd0f4a2c3b9ac3 02-Aug-2012 Mathias Agopian <mathias@google.com> cleanups in preparation of bigger changes

- fix typo drawForSreenshot misspelled
- get rid of DisplayDeviceBase
- removed unused or unneeded code
- always pass a DisplayDevice to Layer methods that are called
on a per-display basis (to make it clear that this could be
called more than once per composition).

Change-Id: Id948b7e09fe5c06db0e42d40d6ed75dd095c7f44
0f2f5ff75b7b48ceb64270655ee6b62d09bf4d00 01-Aug-2012 Mathias Agopian <mathias@google.com> rename DisplayHardware to DisplayDevice

Change-Id: I3f7250cd914e0da4f9ec2c9403587bbe12f3cc62