Commit Graph

706 Commits

Author SHA1 Message Date
Mathias Agopian
1604f777d1 one more step toward HDMI support
getDisplayInfo() now returns proper information for
HWC managed displays.

hotplug is sitll not supported; so this is not fully correct
as the information returned will be bogus if the HDMI screen
is not plugged in.

Bug: 7191563
Change-Id: If55d8e829fae0443571548155007f486cdf9bc9f
2012-09-20 17:13:58 -07:00
Mathias Agopian
eba8c688f6 calculate wether we filter on a per-display basis
Change-Id: I79d80b432b20b3d02428da19add464ac1e2b9378
2012-09-20 17:13:58 -07:00
Mathias Agopian
f33e4b6f13 GraphicBufferAlloc class was declared twice
this was confusing because the one in FramebufferSurface
wasn't in fact being used

Change-Id: Ied45aec20d804cfbe52440f9b2f2852a85c757cf
2012-09-20 17:13:58 -07:00
Jesse Hall
1887af43a5 Merge "Allow 16-bit color EGLConfigs" into jb-mr1-dev 2012-09-19 22:30:56 -07:00
Jesse Hall
f21cffa7d7 Allow 16-bit color EGLConfigs
The emulator without GPU acceleration only supports 16-bit
framebuffers.

Bug: 7185810
Change-Id: I883180367bf5b291d5e70427ab586d2e17868a96
2012-09-19 21:00:49 -07:00
Mathias Agopian
3a24e8f160 Merge changes I561c198c,Id4865f3c into jb-mr1-dev
* changes:
  improve sensor battery usage tracking
  track UID with connections
2012-09-19 16:26:31 -07:00
Mathias Agopian
d56eff2f49 fix typo in DisplayDevice logs
Change-Id: I593ef674f12073bd9d690946447031394ef9044e
2012-09-19 16:25:29 -07:00
Mathias Agopian
787ac1b388 improve sensor battery usage tracking
until now we were tracking when a sensors was
physically enabled or disabled and we were reporting
that to the BattaryService.

this wasn incorrect because we could have several different
apps enabling the same sensor, so the accounting by the
battery service would be incorrect in that case (depending
on the order in which these apps disabled said sensor).

BatteryService tracks sensors per uid, however SensorService
does this per binder connection, so we could have several
binder connections for the same uid, to solve this we keep
a list of sensor/uid -> count, which is the bulk of this
change.

Bug: 6661604
Change-Id: I561c198c42ba1736a8671bdacda4c76d72b9dd6f
2012-09-18 23:33:36 -07:00
Mathias Agopian
5307d17fe3 track UID with connections
Change-Id: Id4865f3cd27a95acdbbfdff1f2bb4123f312a13b
2012-09-18 23:33:36 -07:00
Mathias Agopian
a5b8e8bfa9 fix a typo in SensorService
It shouldn't have caused much harm though.
Also log a warning when enabling a sensor
for a connection that is already enabled.

Change-Id: Ia4a052381e79183cd4cb1bedc7ba08e5228d7a38
2012-09-18 17:19:04 -07:00
Mathias Agopian
1d12d8a8e6 improve logging of external displays
Change-Id: I041aebb7fc655aeca98bbf698d15e05d7c12cac9
2012-09-18 14:42:32 -07:00
Mathias Agopian
6ab93290ae suppress superfluous log
Change-Id: I838f2de4cf99e885833c4f42e2a69d6e3bb8eea5
2012-09-18 13:19:46 -07:00
Jesse Hall
aeb76d160c Merge "Check that HWC exists before trying to use it" into jb-mr1-dev 2012-09-18 12:16:14 -07:00
Jesse Hall
d3d35f1834 Check that HWC exists before trying to use it
Bug: 7185810
Change-Id: I1271d6ba397f3abf0ef166b8d03b9b26b72e28d7
2012-09-18 11:39:40 -07:00
Jamie Gennis
3941cb240d 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
2012-09-18 10:59:40 -07:00
Andy McFadden
8dfa92fef9 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
2012-09-18 09:20:23 -07:00
Mathias Agopian
d870703d55 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
2012-09-18 01:21:55 -07:00
Mathias Agopian
da27af9832 add support hwc 1.1
Bug: 7124069

Change-Id: I53d705105c4ad8954d3f50ee4f4c8b7ec936b871
2012-09-17 18:57:53 -07:00
Mathias Agopian
cde87a3b9d refactor things a bit
- decouple GL and main display initialization
- ensure that each "supported" display has its own FramebufferSurface
- onScreenAcquired/Released now takes a display

Change-Id: If34a05f3dea40f6c79db77f4dde283a2580daac4
2012-09-17 12:37:10 -07:00
Andy McFadden
6905205c8d 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
2012-09-16 11:39:09 -07:00
Jeff Brown
6e220a6ce6 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
2012-09-13 19:24:43 -07:00
Andy McFadden
ae2cfb5746 Minor tweaks
A couple of minor cleanups I stumbled over while looking at other
things.

Change-Id: I385ecfe1afefd577afbc59d7ef1d98d868073651
2012-09-13 11:21:40 -07:00
Jesse Hall
a4383fd9de Merge "Initialize new HWC 1.2 fields" into jb-mr1-dev 2012-09-12 20:18:53 -07:00
Jesse Hall
fa32888f58 Merge "Fix display projection transforms" into jb-mr1-dev 2012-09-12 20:16:28 -07:00
Mathias Agopian
ce3a0a541c don't call hwc with non-empty layer lists for blanked displays
we now make sure to take the blanked state of a display into
account when we build its list of visible layers, this ensures
that we won't call prepare/set with a non-empty list when the
display is blanked.

Possibly fixes 7075380, 7103553, 7130187, 7016215

Bug: 7075380
Change-Id: I9fdd2e73d1b7621eaeca3d4ac2ae60d9fb1b3631
2012-09-12 17:42:06 -07:00
Jesse Hall
db27621e22 Initialize new HWC 1.2 fields
Also rename resolution* to width/height.

Change-Id: Ia5f0c50d3f0a349160f314a3257c3b985e13ef1d
2012-09-12 15:35:44 -07:00
Jesse Hall
6360ec42d4 Fix display projection transforms
Bug: 7139798
Change-Id: I61aafe99180d85563c6880d16bc367fce80e6022
2012-09-12 13:49:10 -07:00
Andy McFadden
2c7c8ba56a Merge "Fix emulator" into jb-mr1-dev 2012-09-12 13:27:01 -07:00
Andy McFadden
babba18687 Fix emulator
Emulator has no HWC.

Change-Id: I7810b27034f6772823142e5bf877681db1c8ee49
2012-09-12 13:17:01 -07:00
Mathias Agopian
92def36f9f Merge "fix typo in LayerBase::dump()" into jb-mr1-dev 2012-09-11 20:53:21 -07:00
Mathias Agopian
791da60dd3 fix typo in LayerBase::dump()
Change-Id: Ie4861a58baed003b7ef643931d41f6be3fbfd00c
2012-09-11 20:52:46 -07:00
Andy McFadden
43601a2dc3 Reduce failure uncertainty
This adds a trivial workaround for a one-shot boot time crash, plus
an explicit check and abort for a failure condition that currently
presents as a less obvious failure.

Bug: 7145521, 7147557
Change-Id: I548f6a9caa9f0bd5710aaecea0e1c6c7c8f2f281
2012-09-11 15:15:13 -07:00
Andy McFadden
b0d1dd36f1 Reshuffle FramebufferSurface
FramebufferSurface no longer speaks directly to the FB HAL.  Now
everything goes through HWComposer (which may or may not be
connected to a hardware composer).

Added display index arg to some query methods.

Change-Id: Id3e157d2d4e3555d33afbb703e518b6e92e2d6d5
2012-09-11 09:31:34 -07:00
Jamie Gennis
61e04b92bd 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
2012-09-10 13:27:23 -07:00
Jeff Brown
4c05dd175e Ensure that viewport and frame are initialized.
onInitializeDisplays() was posting a transaction with changes
to the display projection.  Unfortunately, it only set the
display orientation field and left viewport and frame
uninitialized.

The uninitialized values flowed downstream and found themselves
baked into a bogus DisplayDevice mGlobalTransform.  That transform
was then applied to some Rects which were turned into Regions
that were them combined with other Regions.

Under certain situations, the uninitialized data might have
a largish value, resulting in the creation of Regions with
components in excess of the Region max-value limit of 0x7ffffff
(note that this is not INT_MAX).  Later when performing a
binary operation using the Region, the Spanner would loop
indefinitely trying to figure out how to stuff a humongous
region inside of a max-value region.  Not content to try
just once, the Spanner would continue trying again and
again, pegging the CPU and hanging surface flinger during boot.

Insanity soon followed.

Bug: 7130713
Change-Id: I0016f0c9662185be833474c212a1dd408096ae23
2012-09-09 00:07:17 -07:00
Jeff Brown
4fb3999cea Fix display projection.
Change-Id: I0f253dc3759b99e05ff8344b0f513d8c289702e7
2012-09-07 12:55:10 -07:00
Jamie Gennis
b272541546 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
2012-09-06 17:54:53 -07:00
Mathias Agopian
55882dea1b fix a problem where all hwc layers would have the SKIP flags set
the problem was that LayerBase::setPerFrameData() was always setting
this flag. in fact there was no reason to do this at that point since
the layer is initialized to a default state in setGeometry().

Bug: 7111259
Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
2012-09-05 16:49:04 -07:00
Jesse Hall
fe4c745c6d Merge "Always reset layer acquireFenceFd after commit" into jb-mr1-dev 2012-09-05 13:54:53 -07:00
Jesse Hall
e25d005d91 Always reset layer acquireFenceFd after commit
If SurfaceFlinger needs to refresh the screen but the dirty region is
empty, it won't set the layer acquire fences, and stale file
descriptors will be passed to HWC commit(). Now we make sure to clear
the stale file descriptors for each layer right after commit().

Bug: 7078301
Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
2012-09-05 13:03:10 -07:00
Mathias Agopian
1501d54d63 minor cleanup
Change-Id: Ied80e14878e92a506930f7a5a55adde8f260ec70
2012-09-04 21:04:09 -07:00
Mathias Agopian
762d011475 Merge "display projection API now has a single function instead of 3" into jb-mr1-dev 2012-09-04 20:27:48 -07:00
Mathias Agopian
71e83e1202 the visibleRegion was never set in hwcomposer
Bug: 7089478
Change-Id: I13b031b23ce908d33f431a04e1cf87831b551260
2012-09-04 20:25:39 -07:00
Mathias Agopian
00e8c7a88a display projection API now has a single function instead of 3
Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
2012-09-04 19:30:46 -07:00
Mathias Agopian
da8d0a5c0c implement display viewport and frame
note: viewport clipping is not implemented yet

Change-Id: I7fde7c4de075d409d95c48bb20ba8ee017f6f00a
2012-09-04 16:59:06 -07:00
Andy McFadden
6b09f280e5 Merge "Add timeout when waiting for HW vsync" into jb-mr1-dev 2012-09-04 09:38:39 -07:00
Keun young Park
63f165fd6b add libsurfaceflinger_ddmconnection for PDK build
- the library is dlopened from libsurfaceflinger
- the library built only when libnativehelper exists

Bug: 7089510
Change-Id: Ib3ea1029d7e8f6e055f4b759d0bf68f5123fa8a1
2012-08-31 20:08:33 -07:00
Mathias Agopian
c397360883 the visible region sent to HWC was garbage
we used to have a visibleRegion object per layer, but now
it's per screen; so at somepoint the code got changed to
calculate the per-screen visible region on the stack and that's
what got passed to HWC.

we're now setting the visibleRegionScreen at each frame and
freeing at after the HWC set() call. We use the underlaying
SharedBuffer so that in most cases we don't have to allocate,
free or copy memory around.

Bug: 7089478
Change-Id: I24fa556c76613a225d9fe7a6c6b727bb476144d8
2012-08-31 18:41:22 -07:00
Andy McFadden
6bf552ee02 Add timeout when waiting for HW vsync
This way we don't get stuck if, say, the driver decides not
to send us vsync events.

Change-Id: I4af6358b3a1f304eaae5fd926ed3403fa1091827
2012-08-31 16:47:44 -07:00
Jesse Hall
9ca48916bc If there is no hwc, call eglSwapBuffers for the main display
Bug: 7068568
Change-Id: I6a0309613fe3619d065b9047af6c3fb32b510d97
2012-08-31 13:52:25 -07:00
Jesse Hall
f90883d6a5 Merge "HWC 1.1: hook up hotplug event, use new display config queries" into jb-mr1-dev 2012-08-31 12:57:07 -07:00
Jesse Hall
1bd20e0f9e HWC 1.1: hook up hotplug event, use new display config queries
Change-Id: I2fd359e5fc7e1948072c6bc6b6fe47ea5e8025c1
2012-08-31 09:25:24 -07:00
Jamie Gennis
72f096fb1a 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
2012-08-30 18:26:09 -07:00
Jamie Gennis
2b97769823 Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev 2012-08-30 18:21:11 -07:00
Jesse Hall
ec34af4144 Merge "Handle new device api version encoding" into jb-mr1-dev 2012-08-30 14:24:53 -07:00
Mathias Agopian
93997a8a75 fix a crasher when setting a display to a null surface
Bug: 7076303
Change-Id: I843dd4ee4a603b8ad51bc1ad14e429db15050bec
2012-08-29 18:22:23 -07:00
Mathias Agopian
85d751cba5 we were sometimes not setting fences properly
this would happen when the composition was handled
entirely in h/w composer, in this case, we would
not set the fences for any involved layers.

Bug: 7049373
Change-Id: I1439dc156ce23c24041cdfbbebfe8ff4fdf790f8
2012-08-29 16:59:24 -07:00
Jamie Gennis
31a353da22 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
2012-08-29 15:35:34 -07:00
Jesse Hall
9eb1eb5bb5 Handle new device api version encoding
Change-Id: I3d36058bd5d31c23b3cc4a7eb5aa033b6f3c1955
2012-08-29 10:39:38 -07:00
Mathias Agopian
7e7ed7f77a the layer list per display could contain non-visible layers
this happened because we didn't check that the visible
region was within the bounds of the display.

Bug: 7064121
Change-Id: I2e81850a3dc3d1474253520ad7f9e559c26d5a96
2012-08-28 14:20:00 -07:00
Mathias Agopian
55801e41e6 we were not always clearing the screen properly
Change-Id: I269dd866e965aebd9b3c4667095818202982f4a3
2012-08-27 18:54:24 -07:00
Mathias Agopian
3ee454a7be 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
2012-08-27 17:43:43 -07:00
Jeff Brown
9d4e3d2f42 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
2012-08-27 14:40:17 -07:00
Andy McFadden
13a082e160 Added display initialization method
The primary display device was being configured to "blank" by
default, which prevented the boot animation from appearing
(unless you got lucky with the hardware composer state).

Bug 6975688

Change-Id: I0fa52e9e719c6e997c5725a7baf15d9718461b78
2012-08-24 11:50:34 -07:00
Jamie Gennis
0bceb84773 surfaceflinger: fix display id selection
This change fixes display ID selection so that it never chooses negative
numbers as display IDs.

Change-Id: I5af1acc7b1270b371595e096b18e2a6ad250c7ba
2012-08-24 11:12:28 -07:00
Andy McFadden
9b6a395e65 Revert "Added display initialization method"
Something doesn't seem right (again).

This reverts commit 53ade0853c.

Change-Id: Id5786997ca9dd2a447363e8ac95213ea37468504
2012-08-24 10:12:38 -07:00
Andy McFadden
53ade0853c Added display initialization method
The primary display device was being configured to "blank" by
default, which prevented the boot animation from appearing
(unless you got lucky with the hardware composer state).

Bug 6975688

(This reverts an earlier revert.)
2012-08-24 09:19:56 -07:00
Mathias Agopian
f435863467 teach HWC about multiple displays
Change-Id: I5e72a83d419a729835cb0e1ec45557b4d3fb56b1
2012-08-23 17:41:38 -07:00
Mathias Agopian
30bcc61431 remove support for HWC < 1.0
Change-Id: If7e676a6e3524afeb9af3875125d2131d95db38b
2012-08-23 16:30:12 -07:00
Mathias Agopian
e60b0687c8 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
2012-08-23 16:03:37 -07:00
Mathias Agopian
7c9e82633c Merge "simplify further vsync handling" into jb-mr1-dev 2012-08-23 15:27:09 -07:00
Mathias Agopian
f6bbd44a23 simplify further vsync handling
- we now clean-up "dead" connection in the main loop,
this entirely avoid the problem with the side effects of
releasing strong references. We now only hold on to strong
reference for the connection we will signal.

- also simplify how we build the list of "ready" connections, by
only adding them to the list when we did receive a vsync event

Change-Id: I2a84da431320a2af8e8a93e07622a1d258236f43
2012-08-23 15:26:27 -07:00
Jesse Hall
d12780ed12 Merge "Update for cleanups in hwc interface" into jb-mr1-dev 2012-08-23 09:15:53 -07:00
Ramanan Rajeswaran
bc46e0ad86 Merge "Revert "Added display initialization method"" into jb-mr1-dev 2012-08-22 14:25:48 -07:00
Ramanan Rajeswaran
f1bf89dd88 Revert "Added display initialization method"
This reverts commit 3f3956236a

Change-Id: Ia2a15d9a5db88add6019edf9d955cef1f73d432d
2012-08-22 14:23:50 -07:00
Jesse Hall
bbd164a3c7 Update for cleanups in hwc interface
Change-Id: I363fd8b085167a1af6c14b68012bda5c62bfe59f
2012-08-22 12:09:39 -07:00
Jesse Hall
8f971ff666 Pass the correct number of displays based on HWC version
Change-Id: I27372f5d3102ad56f6d67722d631ae18d37f8330
2012-08-22 12:08:18 -07:00
Andy McFadden
3f3956236a Added display initialization method
The primary display device was being configured to "blank" by
default, which prevented the boot animation from appearing
(unless you got lucky with the hardware composer state).

Bug 6975688

Change-Id: Idaa0d0b98ebb331a17d1b16774c6b05bfa1e8728
2012-08-21 13:11:51 -07:00
Mathias Agopian
a4cb35a286 fix various issues in SF's EventThread
- one issues caused most timestamps to be reported as 0
- on rare occasions an uninitialized variable could be used
- vsync counts per connection were accessed unthreadsafely

we now have 2 lists of connections in the main loop, one just
keeps a list of strong refs to the connections because once
we have a strong ref we're not allowed to release it while
holding the lock.

the 2nd list holds the connections that have a vsync event to
be reported. all the calculations are made with the lock held.

Change-Id: Iacfad3745b05df79d9ece3719bd4c34ddbfd5b83
2012-08-20 21:41:29 -07:00
Mathias Agopian
10125f00a5 Fix deadlock in SF.
problem was that we were acquiring a strong reference
on Connection object with a lock held, when those
got out of scope (lock still held) their dtor
could be called if all other refs had dropped,
the dtor would acquire the lock again to
remove the Connection from the main list. boom.

we rearange the code so this doesn't happen.

Bug: 6942208

Change-Id: I0a0ebabce2842d29d60d645b64aac2f26640e59b
2012-08-17 18:48:56 -07:00
Mathias Agopian
cd60f99aba 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
2012-08-16 20:58:58 -07:00
Mathias Agopian
5f20e2d446 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
2012-08-16 20:58:58 -07:00
Mathias Agopian
818b46058a display states can't share the dirty flags
Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
2012-08-16 20:58:57 -07:00
Mathias Agopian
111b2d8922 binder interfaces can't be compared directly
we always need to compare their binder

Change-Id: I70d554ebc5009fe81e87923235f91451f32e1a30
2012-08-16 20:55:28 -07:00
Mathias Agopian
13233e067b oopsie, missed a spot when fixing b/6970310
Change-Id: Ia320fddc7cc4b0666a4fee678af710ecf5f83ff5
2012-08-15 16:14:33 -07:00
Mathias Agopian
3559b07a88 we were mistakenly optimizing out SF's main transactions in some cases
due to a typo, SF's main transaction was conditional to having a
display transaction.

more correct fix for 6970310

Bug: 6970310
Change-Id: Iafd8c4e02afa5db829cc1c65950cfcc74754c6af
2012-08-15 13:46:03 -07:00
Jeff Brown
ac1f70bb71 Use new PowerManager API.
Change-Id: I66165d9954e2d1da9204216382a05a873f1393f4
2012-08-15 01:16:39 -07:00
Jeff Brown
01eb979243 Fix layer removal transaction.
Layers were not properly being removed because we were
setting the wrong transaction type flag at the time of
removal.

When layers are removed, we must use eDisplayTransactionNeeded,
not eTransactionNeeded, to ensure that the mLayersRemoved
flag is checked and the appropriate cleanup occurs.

Bug: 6970310
Change-Id: Id4b2897a34d4ac00aa0f92349c0ec6db95c1aaf7
2012-08-15 01:16:16 -07:00
Jesse Hall
ea599dfff0 Don't crash when recovering from WM death
Bug: 6956162
Change-Id: I27244b960c77187b4c4cd7297989c4c872e94a3a
2012-08-14 15:33:04 -07:00
Mathias Agopian
20128300e0 make sure to repaint the screen when unblank()ing
Change-Id: I38e3a8e6bb31ef3d2f1fcaec7490cb92a4427db2
2012-08-13 18:32:13 -07:00
Mathias Agopian
8b736f138c xdpi / ydpi were reported as 0
Bug: 6975723
Change-Id: Ia7fa37ec11e2308804f5034959a37e508d292d31
2012-08-13 17:54:26 -07:00
Mathias Agopian
e57f292595 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
2012-08-10 17:32:33 -07:00
Mathias Agopian
ef7b9c7eac 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
2012-08-10 15:23:41 -07:00
Mathias Agopian
748f3df66f avoid crashing when we don't have an h/w composer
should fix the emulator

Bug: 6956162
Change-Id: I38247b59d276b8db078c4dc2caba7d3fb545912c
2012-08-10 14:36:40 -07:00
Mathias Agopian
3165cc21cf libgui includes refactoring
Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
2012-08-10 13:18:24 -07:00
Mathias Agopian
1e26087493 Add a display parameter to HWComposer where needed
- also replace C casts with C++ casts
- only the interface is changed, HWComposer still doesn't
  fully handle multiple displays

Change-Id: I48eb89bff2edb76bf1d4d41f46802b9b2a7166a8
2012-08-10 13:18:24 -07:00
Mathias Agopian
28947d7fbf now able to set the layer stack on a DisplayDevice
Change-Id: Ia9691cf221b9444c243eb468d9e276a30e600b6b
2012-08-10 13:18:23 -07:00
Jesse Hall
b685c54283 Changes to support multi-display HWC
Change-Id: I07efff54f2980dcb013935747b03e099b8f1181b
2012-08-07 12:16:36 -07:00
Jamie Gennis
14bd369e4b Merge changes Ic3d35a93,I46ec942d into jb-mr1-dev
* changes:
  SurfaceTexture: fix an out of bounds array access
  surfaceflinger: refactor FrambufferSurface
2012-08-06 19:15:51 -07:00
Jamie Gennis
1a4d883dcc surfaceflinger: refactor FrambufferSurface
This change refactors the FramebufferSurface class to inherit from the new
ConsumerBase class.

Bug: 6620200
Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
2012-08-06 18:55:01 -07:00