Commit Graph

621 Commits

Author SHA1 Message Date
Mathias Agopian
f74e8e0602 don't attempt to clip layers anymore using glScissor
this seems to hurt performance on some GPU. this change
might negatively affect performance on other GPUs though, but
probably in less time-sensitive cases. If this becomes a
problem it might become necessary to pre-clip the geometry
(so that we don't have to use glScissor).

This improves the rotation animation quite a bit.

Change-Id: I5dbe1286f7ad858ef2c1e1ad9a07ee3f26c0b1f3
2012-04-16 03:19:15 -07:00
Mathias Agopian
a2f4e56fec get rid off preserve backbuffer optimization in SF
this optimization didn't improve performance and in fact
seemed to hurt more than anything else. it also made
things a lot more complex as it introduced edges cases
when switching to/from h/w composer.

Change-Id: Iaafc235e175f5740cd98bff914d706e02ab88bb8
2012-04-16 03:19:15 -07:00
Mathias Agopian
8acce2046a make sure to repaint the screen when screen turns on
Bug: 6336168
Change-Id: Ic6f11b6bf6c3d849f5cb6ac95961d10d7f88e4ec
2012-04-13 16:18:55 -07:00
Mathias Agopian
ac6035a12a s/w rendered apps can now use n-buffering (n>2)
Bug: 6311881
Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
2012-04-13 16:04:44 -07:00
Mathias Agopian
fca660cf73 don't wake-up eventthread every 16ms if there are no vsync requests
Bug: 6332534
Change-Id: Idf79ad913770c6180969f6c95a9b125fff580231
2012-04-12 20:43:16 -07:00
Mathias Agopian
69a655caef Revert "handle surfaces posts independently from composition"
This reverts commit 562f4b2c1e.

Change-Id: I96efe11c2f0494ed2d57fc580e49c598d913830e
2012-04-11 20:43:40 -07:00
Mathias Agopian
562f4b2c1e handle surfaces posts independently from composition
surfaceflinger will now handle each surface post
as soon as possible and handle the composition
itself at VSYNC time as usual.

Change-Id: I6b1ae33fd56062d86e5419ebab8def0ca5803fbf
2012-04-11 18:17:30 -07:00
Mathias Agopian
22ffb117b0 make sure to disable VSYNC while screen is off
Change-Id: If1894c43b0a39a2851e1280a35ae77bccd6d9abd
2012-04-11 15:31:40 -07:00
Mathias Agopian
b60314a12f rework screen on/off code
Change-Id: I13f71e850592a588bbd4805b1830c503bd4decb4
2012-04-10 22:18:43 -07:00
Mathias Agopian
e2c4f4ec23 Added vsync debugging information in dumpsys log
Change-Id: I20ef05a73d89caaf6a70dc9ca25ada6e6a1f6ff9
2012-04-10 21:04:12 -07:00
Mathias Agopian
3a77871383 start VSYNC thread when HWC doesn't handle it
Change-Id: I853a822ea9ec13870ae25af55a89ad9a8cc3936a
2012-04-09 14:16:47 -07:00
Mathias Agopian
2965b26022 VSYNC handling cleanup
Change-Id: I1376bf864c4e03c11fb6d1333a8b7cfdda08c9e4
2012-04-08 20:54:47 -07:00
Mathias Agopian
d94d3b890a avoid turning vsync off/on at each frame
always keep vsync active for an extra frame before
deciding if it should be turned off.

Change-Id: I55b03265b7851b33a595e46a013f2ab55e66c964
2012-04-08 15:01:31 -07:00
Erik Gilling
1a3bf41b71 Fix SurfaceFlinger crash in HWC::eventControl
eventControl was not checking if there was a hwc before callingi
hwc->eventControl

Change-Id: I4d739fc9c0d47da131f4ffc5d50e274de156d012
2012-04-06 14:13:32 -07:00
Mathias Agopian
3eb38cb33e SurfaceFlinger now uses the new VSYNC HAL API.
If h/w composer doesn't support vsync (version < 0.3) we
"fake" it with a timer.

Change-Id: I1e3be79f43c9631d1293ad7d6cf52f9bfc42d65b
2012-04-04 19:01:20 -07:00
Mathias Agopian
9d61b955db Merge "Add HWC vsync hook. Currently unused." 2012-04-03 18:32:39 -07:00
Mathias Agopian
31d2843b45 Add HWC vsync hook. Currently unused.
Change-Id: I849d56f375813a044c5e2d0b25f791476a60fa01
2012-04-03 18:30:35 -07:00
Mathias Agopian
cb9732a951 refactor / simplify EventThread
Change-Id: I3981c6fba93b7b985174b2a7045e24db2c0b4428
2012-04-03 18:28:25 -07:00
Mathias Agopian
7b5be95cb3 use a socketpair instead of a pipe in BitTube
Bug: 6252830
Change-Id: Ia7a7b08409517214136261c05569dc5959a597ab
2012-04-02 18:41:10 -07:00
Mathias Agopian
4b2ba53423 better workaround for bug: 6020860
this prevents the GPU from running when composition
is fully handled by overlays. this should improve
animations a bit.

Change-Id: If4ae584b7a3976e6bdd36e318686ac3940b6b075
2012-03-29 12:23:51 -07:00
Colin Cross
9e0b1f880b 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
2012-03-27 13:57:43 -07:00
Colin Cross
3854ed5490 surfaceflinger: disable ddms debugging on pdk builds
DDMS debugging depends on non-pdk apis, disable it when a pdk
build is selected.

Change-Id: I6376b5c4cf49f2c51f35f8d567f7c6d18daf893f
2012-03-23 15:54:21 -07:00
Mathias Agopian
b5dd9c0fee rewrite density calculation code so it's understandable
Change-Id: I1016cd5fd75355abe4ab879d04f4849bd2dd4122
2012-03-22 12:20:06 -07:00
Dima Zavin
6fc0a9bd4b displayhardware: fix not obeying ro.sf.lcd_density when specified
Change-Id: I71efd6aebfdb0323b07327f5e448a5cb5eb0fad6
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-21 23:37:46 -07:00
Dima Zavin
1b15e1e26b surfaceflinger: use display dpi if not forced with ro.sf.lcd_nensity
Change-Id: I52c4b872e0f2c088c2a6ada7a5bb15db071f0002
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-14 17:15:10 -07:00
Daniel Lam
b267579ba8 SurfaceTexture: Fully refactored from BufferQueue
SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
2012-03-13 14:39:07 -07:00
Mathias Agopian
fddc28d871 add ATRACE logs for screenshots
Change-Id: Ie8146c4d7608159e9d28b7338f9109b8fcdf955f
2012-03-13 16:50:39 -04:00
Mathias Agopian
35aadd6be2 fix surfaceflinger's dumpsys
Change-Id: I7b95c3e04f145003f9c0eef321a21f3f36dfe835
2012-03-08 22:01:51 -08:00
Mathias Agopian
622cfadc8f fixup include paths
- remove unneeded include deps
- remove some hardcoded include paths

Change-Id: Ifae0e2b2d738e0f94f8525c45be78f4227ce1673
2012-03-05 15:59:38 -08:00
Mathias Agopian
841cde5554 add more ATRACE
Change-Id: I6cc5759fb0a05427680488fd12ae797e77644f3d
2012-03-01 20:16:39 -08:00
Mathias Agopian
ed61a47c5b Merge "a window could get stuck to gpu composition" 2012-02-27 19:48:36 -08:00
Jamie Gennis
1c8e95cf86 Add tracing to various graphics components.
This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.

Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
2012-02-27 17:50:35 -08:00
Mathias Agopian
ec923ee0d0 a window could get stuck to gpu composition
this could happen after an orientation change. basically
we need to triger a geometry-changed when the very first buffer
is received

Change-Id: I097e411fd6612c18725737cffccdbf6b2af3511c
2012-02-27 16:58:04 -08:00
Mathias Agopian
90ac799241 fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Mathias Agopian
870b8aa15c remove libui dependency on libEGL
Change-Id: I1194f04085637d5c384e134967249430cc43b6ee
2012-02-24 16:42:46 -08:00
Mathias Agopian
ff615cc7a1 deprecate L_8, LA_88 and RGB_332 in sdk
re-add support for pixelformats L_8, LA_88 and RGB_332 in libui
for backward compatibility.

This may or may not fix 6058926

Bug: 6049685
Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
2012-02-24 14:58:36 -08:00
Mathias Agopian
fbc7922ec8 workaround for an issue where the screen would flicker sometimes
bug: 6020860
Change-Id: I97807db66b66c5f4dcbed0df79d5d257cfc7c0bd
2012-02-23 21:20:01 -08:00
Mathias Agopian
4d143eed99 fix an issue in SF where we could miss some updates
Change-Id: I7d350bc05d1596655baddff3deaebaba58c9bcc0
2012-02-23 21:17:01 -08:00
Glenn Kasten
d11a1083be Merge "createSurface getpid() first parameter was removed" 2012-02-21 07:24:16 -08:00
Mathias Agopian
751d0bb9b2 Merge "SurfaceFlinger: set wrap mode on screenshot texture" 2012-02-20 22:50:36 -08:00
Glenn Kasten
e8c9ec64f0 createSurface getpid() first parameter was removed
Most of these tests in this directory don't currently build,
but test-surface did build incorrectly by bad luck, using the old API.
test-resize still doesn't build, but when the other build errors
are fixed then it will use the right API.

Change-Id: I388d6d59fe0a2328f352214dcdc28839a24043f0
2012-02-09 14:34:15 -08:00
Dianne Hackborn
1676828d11 Merge "Return information about whether overlays are disabled." 2012-02-07 13:46:46 -08:00
Dianne Hackborn
12839bee29 Return information about whether overlays are disabled.
Change-Id: I85ae42e9f28461f5142cc6b3c8e25ff3f195805a
2012-02-06 21:21:05 -08:00
Mathias Agopian
f6de1c04ff fix a crasher when starting SF with the screen off
SF could end-up in an infinite crash-loop during startup if it
was stopped while the screen was off. This happened because
the thread that manages screen blanking was started before
other important pieces of SF were initialized.

Change-Id: I0dded11dbf2395fdd57b673859a7aa0fa9eb32b6
2012-02-05 02:15:28 -08:00
Mathias Agopian
303d538bb0 ui freeze workaround: reenable triple buffering mode
we're seeing UI freezes when window updates and
composition are separated. for now we workaround this
by always doing a composition after window updates on
vsync. triple buffering is reenabled for performance.

Change-Id: I693d705000b7452489bb0b4918fbeadb9879315c
2012-02-05 01:49:16 -08:00
Mathias Agopian
c95dbdc236 improve SF dumpsys 2012-02-05 00:19:27 -08:00
Mathias Agopian
b048cef231 fix UI freezes
In some situations SF would mark a window as "has a pending update"
but would never process that update because the window is not
visible (fully transparent, hidden by another window, etc...), this
window would then be "stuck" until some other window updated.

Change-Id: Ifa18a9aef3a53f2593b473556702688ae62d9503
2012-02-04 15:44:04 -08:00
Mathias Agopian
c9ca701150 attempt to fix an ANR in various apps
recent changes in SF introduced a hang where some windows would
stop being refreshed.
This is an attemp to fix that.

Change-Id: I6aa32ac0d6f1c0a6aea8f6195825dc4f4e6f93f9
2012-02-03 17:22:09 -08:00
Mathias Agopian
064b68d1bc Merge "separate transactions from updates" 2012-02-02 16:28:05 -08:00
Mathias Agopian
67016af1e4 fix an issue where SF would spin if /sys/power/wait_for_fb_xxx don't exist
we now exit the Display thread on any error happening on these files.
also refactor the code and remove a lot of unused stuff.

Change-Id: I8d080c35b211890ca20ae09fa36fbdccdf5669a8
2012-02-02 16:20:27 -08:00
Mathias Agopian
99ce5cdeb3 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
2012-02-01 20:43:06 -08:00
Mathias Agopian
baf1c68c74 Merge "fix an issue with vsync event delivery" 2012-01-31 16:46:27 -08:00
Mathias Agopian
3cf199aef6 fix an issue with vsync event delivery
vsync events were sometimes delivered to connected
client who didn't request them. this happened if
another client requested the delivery and that client
was first in the client list.

also fix the vsync test which didn't request any events as
well as DisplayEventReveiver documentation which was misleading
about the necessity to request vsync events.

Change-Id: Ie990fda3f337f8f0042745c4b2cde67936c45686
2012-01-31 16:42:54 -08:00
Mathias Agopian
2bfa31c0cc Nexus S now reports the proper frame-rate
don't hardcode it.

Change-Id: I4b37f37a9809cac937e6334c988b3185af2ebe22
2012-01-30 18:45:15 -08:00
Mathias Agopian
8aedd4737d SF now synchronizes to VSYNC
Change-Id: Ic5e4f2ea9927ce133eef9499c03161325e9d02c5
2012-01-30 15:21:23 -08:00
Mathias Agopian
ad8d13c885 remove unneeded code
Change-Id: I07e2fca7274d2e12bf5b4aee0050794bdb97a8b3
2012-01-29 23:11:06 -08:00
Mathias Agopian
25e66fc324 added a few more commands to SF's dumpsys
--latency-clear [name]
clears the latency data for the specified layer or for
all layers if none is specified

--list
prints the list of all layers regardless of their visibility

Change-Id: I7c07ae020f838c173b98ee50f3fb3e93da78acbb
2012-01-28 22:31:55 -08:00
Mathias Agopian
82d7ab6c7e improve SurfaceFlinger dumpsys
It is now possible to say:

dumpsys SurfaceFlinger --latency

to print latency information about all windows

dumpsys SurfaceFlinger --latency window-name

to print the latency stats of the specified window

for instance: dumpsys SurfaceFlinger --latency SurfaceView

The data consists of one line containing global stats, followed by
128 lines of tab separated timestamps in nanosecond.

The first line currently contains the refresh period in nanosecond.
Each 128 following line contains 3 timestamps, of respectively
the app draw time, the vsync timestamp just prior the call to set and
the timestamp of the call to set.

Change-Id: Ib6b6da1d7e2e6ba49c282bdbc0b56a7dc203343a
2012-01-24 18:22:56 -08:00
Jamie Gennis
e8696a40e0 hack up frame latency measurement
Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
2012-01-24 15:41:50 -08:00
Glenn Kasten
1db13d7951 Get AID_GRAPHICS from right place
Change-Id: I97b1754dc7260fec083275c71a8f71ebfb2cefa8
2012-01-13 13:45:39 -08:00
Michael I. Gold
b1d1c6d4c2 SurfaceFlinger: set wrap mode on screenshot texture
Some implementations of NPOT, particular those derived from core
GLES2, require the wrap mode to be CLAMP_TO_EDGE.  Set the required
wrap mode for the screenshot texture so it passes the completeness
check.

Change-Id: I735016123e4acaf54b40d1435bd70281cef88a31
2012-01-13 00:36:45 -08:00
Mathias Agopian
616c0cdf2c fix a bug with vsync management
this bug was introduced recently. we were signaling *all* clients
regardless of the vsync rate.

Change-Id: I2ae8a6c820a390f602382596ba75e8ed737fb2ef
2012-01-12 16:13:54 -08:00
Mathias Agopian
55ef343331 remove dead/usnused code
Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
2012-01-11 22:03:41 -08:00
Mathias Agopian
a72d0db292 Fix an issue with VSYNC
one-shot VSYNC listeners could miss a VSYNC event if
scheduled while in waitForVsync().

Change-Id: I720485784aecfea6cc7a23c77081d7af3c9c71db
2012-01-11 22:03:40 -08:00
Steve Block
e6f43ddce7 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
2012-01-08 13:19:13 +00:00
Steve Block
32397c1cd3 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
2012-01-06 10:07:54 +00:00
Steve Block
c267bab3d1 Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE" 2012-01-05 14:07:02 -08:00
Glenn Kasten
2adea706d4 Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros" 2012-01-05 07:38:29 -08:00
Glenn Kasten
99ed22412d 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
2012-01-05 07:33:45 -08:00
Steve Block
a19954ab37 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
2012-01-04 20:05:49 +00:00
Steve Block
9d45368352 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
2012-01-03 22:38:27 +00:00
Mathias Agopian
478ae5eb5a 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
2011-12-06 22:43:10 -08:00
Mathias Agopian
23748668d3 fix a deadlock when removing a DisplayEventConnection
the deadlock would happen when the pipe became invalid and SF
trying to remove the connection from its list.

we know make sure to process events without holding a lock.

Change-Id: I39927ed8824fc7811e16db3c7608a2ebc72d9642
2011-12-05 19:58:47 -08:00
Mathias Agopian
75b95f5bc1 Merge "fix an issue where invalidate/transactions could be missed" 2011-12-04 00:45:50 -08:00
Mathias Agopian
be42aef82f fix an issue where invalidate/transactions could be missed
Change-Id: I84a1fcba1317b2631f5441de7b7ecd12af5ad022
2011-12-03 14:47:29 -08:00
Jesse Hall
43bfe7f047 am a91e54fe: am f57c1388: Merge "SurfaceFlinger: fix layer removal race condition" into ics-mr1
* commit 'a91e54fed6a0690d59c97bab9b081b2614880563':
  SurfaceFlinger: fix layer removal race condition
2011-12-02 18:35:54 -08:00
Mathias Agopian
2228936411 fix an issue where updates could starve transactions
Bug: 5700586
Change-Id: Iaa4adc1a6aea1db6e2943efe4caca1f6cbebfa72
2011-12-02 16:11:19 -08:00
Jesse Hall
2f4b68d21c SurfaceFlinger: fix layer removal race condition
Layer::lockPageFlip() and layer::onRemove() could be called on
different threads and race such that lockPageFlip() successfully
called mSurfaceTexture->updateTexImage() but then gets NULL back from
mSurfaceTexture->getCurrentBuffer(), leading to a crash.

This change moves Layer::onRemove() calls to
SurfaceFlinger::commitTransaction() so they happen after the Layer is
done being drawn from and only happen on the main surfaceflinger
thread.

Change-Id: I4b550caadff4cc1878d7c3bca6129193fb0c713e
2011-12-02 10:03:25 -08:00
Mathias Agopian
79544364aa am e2970700: am e8ba2aba: Merge "add a way to access the version string of the h/w implementation of EGL" into ics-mr1
* commit 'e2970700e921da4226061988a6e8953b1fbfb5a9':
  add a way to access the version string of the h/w implementation of EGL
2011-11-30 13:57:46 -08:00
Mathias Agopian
363c4a9fa0 Merge "add a way to access the version string of the h/w implementation of EGL" into ics-mr1 2011-11-30 13:52:21 -08:00
Mathias Agopian
a4fbecd119 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
2011-11-30 10:50:52 -08:00
Mathias Agopian
bc2d79ed7a add a way to access the version string of the h/w implementation of EGL
we use a hidden egl extension. the version string is printed
in SF's dumpsys log.

Change-Id: I123eb4bde6de462bb2404c67b74d6d6219a48d6a
2011-11-29 18:00:35 -08:00
Jamie Gennis
86edf4f647 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
2011-11-29 17:09:01 -08:00
Mathias Agopian
d0566bc26f 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
2011-11-29 13:10:25 -08:00
Mathias Agopian
439cf8576d Fix build.
Revert "Add support for sending VSYNC events to the framework"

This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.

Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
2011-11-29 13:07:40 -08:00
Mathias Agopian
8219e9122e Merge changes If4126023,Iacda2386,I1eb691f7,Ib56139f8
* changes:
  Add support for sending VSYNC events to the framework
  BitTube::read now handles EAGAIN
  split ComposerService out of SurfaceComposerClient.h
  rewrite SF's message loop on top of Looper
2011-11-29 11:47:03 -08:00
Mathias Agopian
461afeb9fd 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
2011-11-29 11:44:05 -08:00
Mathias Agopian
f61c57fe2e rewrite SF's message loop on top of Looper
Change-Id: Ib56139f87a5c0b124e34da5c8151207219b2577b
2011-11-28 15:21:57 -08:00
Mathias Agopian
b8bb31dc10 temporarily hardcode Nexus S refresh rate
Change-Id: Id8465f679b96636041b4b891d0b358c387d456c3
2011-11-23 14:51:09 -08:00
Mathias Agopian
465494486c remove hack that hardcoded the refresh rate
Change-Id: Ibdd40b337c547e80ef8541856015f1380c8d58ed
2011-11-16 00:08:08 -08:00
Mathias Agopian
4b9511c161 rework a bit how we manage EGL extensions
- don't advertise extensions that are not supported
  by any implementation

- remove EGL_ANDROID_swap_rectangle which is not
  implemented by anybody and confuses people

- add some comments about mandatory extensions

Bug: 5428001
Change-Id: Id8dc48116ac1d1eb79ec9ef55d03e29d4257c1f3
2011-11-14 19:05:45 -08:00
Dave Burke
2f78cf1122 Back to 59fps
Change-Id: I8d89e5e27f1abc5a2e36cb832eb4db2ca83c2cc6
2011-11-09 17:54:37 -08:00
Mathias Agopian
386aa98c4f Fix an issue where we could wait for a non-existing transaction
This fixes the issue:
"Call not sent" dialog takes too long to dismiss after hitting OK"

Note: the system would recover after a 5 second timeout.

Bug: 5534520
Change-Id: Ifa37e594b50581f498479a5858672441b3d7dd87
2011-11-07 21:58:03 -08:00
Mathias Agopian
a5f9676ecc Merge "Fix rotation displays frame N-1 briefly while rotating" into ics-mr1 2011-11-07 21:33:53 -08:00
Mathias Agopian
385977f6d6 workaround to set the WM refresh rate to 48 Hz for tuna devices only
this is TEMPORARY until we can do this properly.

Bug: 5572464
Change-Id: I6537706d636a83a4a50e2900d6b829dd89b6f245
2011-11-04 18:46:11 -07:00
Mathias Agopian
4a9ac37fe2 Fix rotation displays frame N-1 briefly while rotating
The ScreenShot layer is now created hidden. The screenshot itself
is aquired during the transaction when the layer is made visible.
This guarantees the screenshot and the layer happen atomically
with respect to screen updates.

Bug: 5534521
Change-Id: Ida23e1f13d5716ec83b78a15712e0646d6cf8729
2011-11-04 15:15:32 -07:00
Mathias Agopian
62f7114719 fix Corrupted graphics while playing You Tube on orientation change
Bug: 5432124
Change-Id: If948b9797b1ec6fff80ca5ea94508abcaced9f31
2011-10-26 15:11:59 -07:00
Xavier Ducrohet
7f6aec0185 Merge "Fix software GL renderer." 2011-10-21 16:22:15 -07:00
Xavier Ducrohet
4c4163b53e Fix software GL renderer.
Change-Id: I07ab2709fa694e41aa3fcc5b9dfc809f55853ab4
2011-10-21 16:18:48 -07:00
Mathias Agopian
51726c381e am aa938c8d: Merge "mDirtyRegion is single threaded, but could be accessed from a hwc thread" into ics-mr0
* commit 'aa938c8d9c0e71c9b556657cb33794210ce6ebf8':
  mDirtyRegion is single threaded, but could be accessed from a hwc thread
2011-10-21 16:00:00 -07:00
Mathias Agopian
0dfb7b73a4 mDirtyRegion is single threaded, but could be accessed from a hwc thread
We now have mInvalidateRegion which holds the region to invalidate, it
can be set from any thread as long as mInvalidateLock is held. We use
fine-grained locking here because mInvalidateRegion can be set from anywhere,
in particular frmo HWC callbacks.

Bug: 5466774
Change-Id: Iafca20aa3f5b25a87755e65bde7b769aa8f997bc
2011-10-21 15:41:01 -07:00
Mathias Agopian
7ec662c07a am 16bece04: Merge "added dpi and refresh rate info in SF\'s dumpsys" into ics-mr0
* commit '16bece04bdbac9af5228436f70267ec5763315de':
  added dpi and refresh rate info in SF's dumpsys
2011-10-20 17:48:02 -07:00
Mathias Agopian
d5e4ef9e43 added dpi and refresh rate info in SF's dumpsys
Change-Id: I2327248eb1993689367e3daeaccba74c172dfceb
2011-10-20 17:22:38 -07:00
Dave Burke
818fb24357 am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0
* commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac':
  Add a LayerScreenshot
2011-10-18 23:00:08 -07:00
Mathias Agopian
675370ab9a am f7613743: Merge "Don\'t call hwc set() if there is nothing new to do" into ics-mr0
* commit 'f7613743f29f38cbbaf4ae09996c380845a17daf':
  Don't call hwc set() if there is nothing new to do
2011-10-18 20:24:23 -07:00
Mathias Agopian
5ba8f366bd am 23bf2505: Merge "Make sure set GL state properly" into ics-mr0
* commit '23bf250522b7dff9acd14c5900b66b1df9c76745':
  Make sure set GL state properly
2011-10-18 20:24:21 -07:00
Mathias Agopian
118d0245ee Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Make sure to call compositionComplete() after rendering into a FBO.

Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
2011-10-18 20:21:47 -07:00
Mathias Agopian
3a3cad30c4 Don't call hwc set() if there is nothing new to do
there was situations where SF's main loop would run (as if there was
an invalidate), but the dirty region was empty (so no new buffers
were retired). In this case we return early and don't swap, which
would cause drawing artifacts.

Bug: 5476838
Change-Id: Id3b7bf4b7aabec7919c50d9278eb2165973a4c3d
2011-10-18 17:39:09 -07:00
Mathias Agopian
c492e67810 Make sure set GL state properly
when taking a screenshot, in particular, we could end up
with stale GL state when drawing LayerDim which resulted
in incortect rendering.

Bug: 5467587
Change-Id: Id9fbed2843481d31063620f3662b364c7e3ac781
2011-10-18 15:32:57 -07:00
Mathias Agopian
cdec8f01aa am 840b8a67: Revert "Add a LayerScreenshot"
* commit '840b8a678537519c27ddf2f818494eaa20a135d4':
  Revert "Add a LayerScreenshot"
2011-10-17 11:32:19 -07:00
Mathias Agopian
5bacca6238 am 4fb6416e: Merge "we need to guarantee that h/w comp set() is called when a buffer has been retired" into ics-mr0
* commit '4fb6416e3a21031a88921a784ae62b13d8a1a39f':
  we need to guarantee that h/w comp set() is called when a buffer has been retired
2011-10-17 11:32:16 -07:00
Elliott Hughes
090cb44b94 Merge branch 'master' of ssh://android-git:29418/platform/frameworks/base 2011-10-17 11:32:08 -07:00
Mathias Agopian
e9800c8311 Revert "Add a LayerScreenshot"
This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
2011-10-16 23:54:25 -07:00
Mathias Agopian
a44b041639 we need to guarantee that h/w comp set() is called when a buffer has been retired
removed a test that could violate this guarantee. note that we
have no proof tha this ever happened, but consequences could be
hard lock-ups.

the code here was intended to track the region to update for displays
that can do partial update. the logic discarded the update entirely
if that region was empty. instead we just redraw the whole thing
(note that we should never be there with an empty region and retired
buffers though).

Bug: 5466259

Change-Id: I91ccab3b1a599e729e438eb833939e2236da6854
2011-10-16 18:59:38 -07:00
Jamie Gennis
a402c4c991 SurfaceFlinger: Remove display freezing code
This change removes the dead code from SurfaceFlinger that resulted from
disabling support for freezing the display.

Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
2011-10-14 16:44:08 -07:00
Jamie Gennis
23c2c5d1c6 SurfaceFlinger: add some layer update tests
This change adds two tests for SurfaceFlinger's behavior when updating
the position and size of a layer.

Change-Id: Id5e3ca1d7e629a3bd2c2d28275d80c7f9256d6da
2011-10-14 16:11:51 -07:00
Jamie Gennis
28378392fd 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
2011-10-14 16:11:51 -07:00
Mathias Agopian
f171ab6da9 Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
2011-10-14 14:32:48 -07:00
Jamie Gennis
b8d69a55f1 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
2011-10-11 13:34:01 -07:00
Mathias Agopian
e64206915d Merge "fix an issue where the screen could stay off" 2011-10-10 22:21:57 -07:00
Mathias Agopian
f7cdd053fe fix an issue where the screen could stay off
this would happen when toggling on/off/on very fast, the screen
could stay black (while the panel is on).

Bug: 5429724
Change-Id: Ic8aa6aff066e6267923c0d47ef65e314e7bb6d41
2011-10-10 22:18:55 -07:00
Mathias Agopian
1dea97d662 Merge "Fix screen off animation when in landscape" 2011-10-10 19:05:23 -07:00
Mathias Agopian
a9040d0eef Fix screen off animation when in landscape
Change-Id: I4bc5b12d7a64a4bf8b9a851594be4d60b790d1ed
2011-10-10 19:02:07 -07:00
Mathias Agopian
8cb9d95002 Merge "enable EGL_IMG_context_priority for the omap4 platform" 2011-10-10 12:38:16 -07:00
Jamie Gennis
9575f60722 SurfaceFlinger: screenshots w/ protected buffers
This change modifies SurfaceFlinger's screenshot behavior when a layer
with a protected buffer is visible.  The previous behavior was to simply
fail the screenshot.  The new behavior is to render the screenshot using
a placeholder texture where the protected buffer would have been.

Change-Id: I5e50cb2f3b31b2ea81cfe291c9b4a42e9ee71874
2011-10-07 17:53:37 -07:00
Mathias Agopian
57bf9e7100 enable EGL_IMG_context_priority for the omap4 platform
Bug: 5311015
Change-Id: Icaad3d1c963d382ac0a4b9121fe20d3408846c2b
2011-10-07 15:42:53 -07:00
Mathias Agopian
e2c2f9213f Force a repaint when hwc invalidate hook is called
without this prepare() would be called but not set() since the
dirty region is empty.

Change-Id: I038acfbdad4c16015357ccde4d1949391d6f989d
2011-10-05 15:00:22 -07:00
Mathias Agopian
aebac5f34a improve hwc log output
we now print the handle of each buffer

Change-Id: I70884ae458a9dcf10cfc403258d48eaa4618b7f4
2011-09-29 18:07:08 -07:00
Jamie Gennis
ed984d9406 Merge changes Ib302d79e,Ib4ee085f
* changes:
  SurfaceFlinger: set layer names on SurfaceTextures
  SurfaceTexture: add name support
2011-09-27 14:24:09 -07:00
Jamie Gennis
e790db9980 am da42e0fa: Merge "SurfaceFlinger: fix setting default buffer size" into ics-factoryrom
* commit 'da42e0faaa95c796dc49f3b38023562dab6584a7':
  SurfaceFlinger: fix setting default buffer size
2011-09-27 12:32:17 -07:00
Jamie Gennis
1b5f4e61ff Merge "SurfaceFlinger: fix setting default buffer size" into ics-factoryrom 2011-09-27 12:28:59 -07:00
Jamie Gennis
9a375927a5 am 3780d380: Merge "SurfaceFlinger: fix the transform hint" into ics-factoryrom
* commit '3780d38010f50ccce508871058d54c1921936e0c':
  SurfaceFlinger: fix the transform hint
2011-09-26 19:44:41 -07:00
Jamie Gennis
2a0d5b6084 SurfaceFlinger: fix setting default buffer size
This change makes SurfaceFlinger update a SurfaceTextureLayer's default
buffer size in response to a window resize even if the Layer is in fixed
size mode.

Change-Id: I3871c8f19a045d03904d1284390cad7659be71ff
Bug: 5366426
2011-09-26 18:38:52 -07:00
Mathias Agopian
4801404dcb don't clear the framebuffer when the framebuffer is not used
when areas of the FB are undefined (transparent windows on top of
nothing), we clear those areas before composition.
however, it makes no sense to do this when the FB is not in use
(case where hwc handles all layers)

Bug: 5360529
Change-Id: I761a7d3664228ebbee0944aca8b0cc278fc94c9c
2011-09-26 16:14:05 -07:00
Jamie Gennis
36d2c1f02c Merge "(DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlip" into ics-factoryrom 2011-09-26 15:44:41 -07:00
Jamie Gennis
8d91b42507 SurfaceFlinger: fix the transform hint
This change fixes the transform hint to use only the global display
transform rather than incorporating the transient layer-specific
transform used during animations.

Bug: 5366891
Change-Id: I5408dcd3f4771d010953e8a696a484c835bfe81e
2011-09-24 11:27:20 -07:00
Mathias Agopian
059fd18396 Merge "don't clear the framebuffer when the framebuffer is not used" 2011-09-22 21:01:21 -07:00
Mathias Agopian
cfb7d090bb Merge "fix dumpsys wording for h/w composer" 2011-09-22 21:00:49 -07:00
Mathias Agopian
cd20eb09c4 don't clear the framebuffer when the framebuffer is not used
when areas of the FB are undefined (transparent windows on top of
nothing), we clear those areas before composition.
however, it makes no sense to do this when the FB is not in use
(case where hwc handles all layers)

Bug: 5360529
Change-Id: If51bb669307e8419bbe1f3a89d1c88e0ec1f216c
2011-09-22 20:57:04 -07:00
Jamie Gennis
a249f2d112 SurfaceFlinger: set layer names on SurfaceTextures
This change sets the SurfaceTexture name string to match that of the
layer to which it belongs.

Change-Id: Ib302d79e916a36ab1e54cb9ff477c3b857bd957b
2011-09-22 17:50:05 -07:00
Mathias Agopian
fc60b94db9 fix dumpsys wording for h/w composer
Change-Id: Iaa1094964f2fb83da491e23b9309f7690079c17e
2011-09-22 16:26:39 -07:00
Jeff Brown
21230c6410 Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager.  Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out.  For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes.  The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise.  We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened.  We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
2011-09-21 19:26:15 -07:00
Mathias Agopian
8bfdda9ab3 fix transition from full overlays to fb
we need to clear the whole framebuffer in that situation because
we can't trust the content of the FB when partial (fb preserving)
updates are used.

Bug: 5318492

Change-Id: I3f0e01b0fb665a34e44d88ad9f0f54a5d990060b
2011-09-20 17:57:55 -07:00
Mathias Agopian
56eb3fc695 rename mInvalidRegion to mSwapRegion
Change-Id: I946cbc782c0c84645843ea44c3d8b04a0a2fe658
2011-09-20 17:57:27 -07:00
Mathias Agopian
670a8990e8 improve hwc dumpsys
we now log the buffer's format

Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
2011-09-20 17:57:15 -07:00
Mathias Agopian
9c6e297271 fix transition from full overlays to fb
we need to clear the whole framebuffer in that situation because
we can't trust the content of the FB when partial (fb preserving)
updates are used.

Bug: 5318492

Change-Id: I3f0e01b0fb665a34e44d88ad9f0f54a5d990060b
2011-09-20 17:53:33 -07:00
Mathias Agopian
0656a68380 rename mInvalidRegion to mSwapRegion
Change-Id: I946cbc782c0c84645843ea44c3d8b04a0a2fe658
2011-09-20 17:53:33 -07:00
Mathias Agopian
fb4d5d5726 improve hwc dumpsys
we now log the buffer's format

Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
2011-09-20 17:53:33 -07:00
Jamie Gennis
351a513b12 (DO NOT MERGE) SurfaceFlinger: fix isOpaque check in lockPageFlip
This change fixes an issue where Layer::isOpaque was being called in
lockPageFlip to get the opaqueness for the new buffer before
mActiveBuffer was updated.

Bug: 5321313
Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
2011-09-16 11:51:04 -07:00
Jamie Gennis
945d291699 SurfaceFlinger: fix isOpaque check in lockPageFlip
This change fixes an issue where Layer::isOpaque was being called in
lockPageFlip to get the opaqueness for the new buffer before
mActiveBuffer was updated.

Bug: 5321313
Change-Id: Ibb5d7d3f4e9a2b1448e117a484a0d9f9ca5fc9de
2011-09-14 18:23:37 -07:00
Mathias Agopian
f9abeb956f Fix another problem with refreshing the screen when switching to/from overlay
the previous fix was incorrect. See comment in setupHardwareComposer for
full explanations.

Change-Id: Ib24a9af000b8f95cf7319f9272d34997064ceb6d
2011-09-09 01:47:48 -07:00
Mathias Agopian
22da60c3e6 Improve SF dumpsys output wrt HWC
Change-Id: Ibdb7930fa3b521bfd3f44750ed98cfd75f9a01fe
2011-09-09 00:49:44 -07:00
Mathias Agopian
f384cc3008 Fix an issue is SF that caused drawing artifacts when hwc changed mode
we were not redrawing and/or clearing the FB properly when
hwc moved a layer from/to FB to/from OVERLAY.

In these cases we needed to expand the dirty region to include
the layer that changed mode.

Also split composeSurfaces() which was becoming quite large.

Change-Id: Id6fa1acfc4ff694037fddf7efd037a4405732073
2011-09-08 22:43:01 -07:00
Mathias Agopian
7ee4cd5556 fix a bug that caused the off animation to not show sometimes
this happened when the overlays were in use, since the animation
is rendered in the FB and the FB is not used.

we now have a way to turn hwc off temporarily.

Change-Id: I3385f0c25bb9cc91948e7b26e7cd31ed18c36ace
2011-09-02 12:22:39 -07:00
Mathias Agopian
f914e7ffad Fix various flickering / artifacts
these were due to the "preserve backbuffer" optimization
interfering with hw composer. basically the screen needed
to be redrawn in the areas that move from GL to
overlay.

Bug: 5245513
Change-Id: I9bf75c4fe905f3ef62005e52108b94edae692304
2011-09-01 18:56:54 -07:00
Mathias Agopian
3f41963ccb Merge "fix Surface positions are not floats" 2011-08-30 19:24:04 -07:00
Mathias Agopian
41b6aabf35 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
2011-08-30 18:51:54 -07:00
Mathias Agopian
c7f3381c3b fix display artifacts in preview screen in timelapse video mode
We were not updating the h/w composer state when the buffer size
changed.

We also didn't update the h/w composer state when the transformation
matrix changed (which is related to the above issue, since it would
probably change when the buffer size changes).

Also moved updating the crop to setGeometry(), since we decided
that the "crop" change requires the GEOMETRY_CHANGED flag (ie:
not need to do this every frame)

Bug: 5238473

Change-Id: Ia7b47e145b48581b568d89d9aa2c14ff778be862
2011-08-30 15:31:51 -07:00
Mathias Agopian
b0610335d7 Fix screenshots
Change-Id: If904634e64b154bbe336d5789dd1209b8ae871fb
2011-08-25 14:36:43 -07:00
Mathias Agopian
e46016d052 Merge "Fix Recent thumbnails aren't taken when leaving an activity via notification" 2011-08-24 17:53:21 -07:00
Mathias Agopian
0abe83a680 Fix Recent thumbnails aren't taken when leaving an activity via notification
When taking screenshots we need to use the full drawing state list
instead of the visible list.

Bug: 5186823
Change-Id: I214ee0203aaf8e2c038e44581f7f1ae36edf08c5
2011-08-24 17:44:41 -07:00
Jamie Gennis
85b6f7afea Merge "SurfaceFlinger: use the HWC gralloc usage bit" 2011-08-24 15:12:04 -07:00
Mathias Agopian
45d845190d Merge changes I14e03939,I9aafe6f2
* changes:
  Fix an issue where Surface::lock() would never update the output region
  Add a debug option to turn the "transformation hint" off
2011-08-23 21:38:59 -07:00
Mathias Agopian
a45836466c Add a debug option to turn the "transformation hint" off
transformation hint is disabled with:

   adb shell service call SurfaceFlinger 1009 i32 1

Change-Id: I9aafe6f280f88ce41569ed69a06dc522b10e3a88
2011-08-23 21:10:35 -07:00
Mathias Agopian
f7ae69d4bd Minor cleanup
Change-Id: Ic042043c54631b5a5c74d20136addb2c08515ea9
2011-08-23 15:57:42 -07:00
Mathias Agopian
53331da007 fix "show screen update" debug option.
Change-Id: I7d8b24124768b5f7d59d3bb0b019e9baaa0dfc4f
NOTE: from now on, this also disable the h/w composer
2011-08-22 21:44:41 -07:00
Jamie Gennis
3599bf2c07 SurfaceFlinger: use the HWC gralloc usage bit
This change makes SurfaceFlinger always use the
GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be
passed to the HWComposer.

Change-Id: I70362a8ede2b359fb2046853f85149d597465817
2011-08-22 14:56:29 -07:00
Mathias Agopian
d992db3827 give the proper orientation to the h/w composer HAL
we were using the "orientation" value instead of the
real transform, which may contain arbitrary rotations for
instance, and in some case ended up with a final "orientation"
that looked valid, but wasn't.

this fixes a problem on devices with a h/w composer hal where
the rotation animation looked weird.

Change-Id: I4be8a2a1bde49c33456fcf5c8d87ab515c216763
2011-08-18 18:33:44 -07:00
Jamie Gennis
582270d69d 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
2011-08-17 18:19:00 -07:00
Mathias Agopian
8afb7e39a8 as a debug option SrufaceFlinger can now connect to DDMS
this is disabled by default. To enable:
  setprop debug.sf.ddms 1

this debug option requires to restart SurfaceFlinger

Change-Id: Ic2f8050b29911b55bcd21721648b6978700c277d
2011-08-15 20:44:40 -07:00
Mathias Agopian
c5953904ad fix an orientation change drawing artifact.
a wrong orientation would be briefly shown when
rotation the screen. this happened when the window manager
set a custom transformation and the h/w composer was used.

the custom transformation was applied twice in that case.

Bug: 5037522
Change-Id: Ic1f87b63cd843f4475e4265d1624463825d775c4
2011-08-12 17:09:09 -07:00
Mathias Agopian
47d0812977 SurfaceFlinger doesn't rely on having a custom RefBase destructor
we just use a message to the main thread to
destroy our GLES state.
2011-08-11 22:33:02 -07:00
Mathias Agopian
5bfc24515b 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
2011-08-08 20:25:44 -07:00
Mathias Agopian
ad795baecc improve dumpsys SurfaceFlinger output
we now output the handle and size of all buffers of each layer.

Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
2011-08-08 16:02:13 -07:00
Mathias Agopian
e8067a7d99 fix a crasher in surfaceflinger
this would happen if being told to draw before a buffer
was available.

Change-Id: I46d121c73e883078cdbf952063e38b0076f79038
2011-08-02 18:29:57 -07:00
Mathias Agopian
6d30c2bdae Merge "update HWC data structures even when a layer is marked for SKIP" 2011-08-02 17:09:18 -07:00
Mathias Agopian
a537c0f42e update HWC data structures even when a layer is marked for SKIP
Change-Id: I16bcf44cd617814a14a795429bde2f39f411077d
2011-08-02 15:51:37 -07:00
Mathias Agopian
c7d14e2471 Add a h/w composer API to allow the HAL to trigger a redraw
This is useful in various situations, for instance if the HAL
wants to change its compositing strategy.

Bug: 4488017
Change-Id: I5afc14e5917c6db7926d7417d48677d5aba50caa
2011-08-01 20:48:05 -07:00
Jamie Gennis
05ca9998cd Merge "SurfaceFlinger: use async mode for video & cam" 2011-08-01 13:40:29 -07:00
Jamie Gennis
cb6c755234 SurfaceFlinger: use async mode for video & cam
This change makes SurfaceFlinger's SurfaceTexture objects default to
async mode whenever a camera or video decoder connects.  This behavior
can be disabled by #defining NEVER_DEFAULT_TO_ASYNC_MODE.

Change-Id: I8965951d1775915da180e4af298dd7af3afafecc
2011-07-30 16:47:44 -07:00
Jamie Gennis
dbe6486ca1 SurfaceFlinger: abandon Layer SurfaceTextures
This change makes the Layer::onRemoved method call
SurfaceTextures::abandon on the layer's SurfaceTexture.  This will cause
all client-initiated operations on the SurfaceTexture to fail.  In
particular, this will result in an error on the client side, rather than
a deadlock when removing a layer that used a SurfaceTexture in
synchronous mode.

Change-Id: I14014d00369f29560a21b606831edee432bb8867
Bug: 5020874
2011-07-30 14:38:20 -07:00
Jamie Gennis
db5230f444 SurfaceFlinger: fix a layer occlusion bug
This change fixes a bug where the window visibility would be computed
before any buffers were available, causing the window to be treated as
non-opaque.  When the first buffer arrived, if both mCurrentOpacity and
the opacity determined by the buffer's format were 'opaque', a
recomputation of the opacity would not be done, and the window would
continue to be treated as non-opaque.  SurfaceFlinger could then
unnecessarily draw fully occluded layers.

Change-Id: I2b95da2f4b50e68d50fc5afd8b772e26e62f58d6
Bug: 5057122
2011-07-28 16:03:28 -07:00
Mathias Agopian
3fbce7c560 remove dead code and member variables.
also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
2011-07-25 20:03:43 -07:00
Mathias Agopian
ab7c13f96a fix a typo that prevented preserveRects() to work properly
this caused drawing artifacts during the screen rotation
animation of SurfaceView.

Change-Id: Idcc996b6ca2e346135dd2264959670c0b086d4cb
2011-07-25 13:57:16 -07:00
Mathias Agopian
6dc49c09bc Fix typo which caused invalid rotations to be returned with NATIVE_WINDOW_TRANSFORM_HINT
Bug: 4487161
Change-Id: Ib2dfbbef15397b6d90695bd27f25849ca20704f1
2011-07-22 15:25:20 -07:00
Mathias Agopian
bb66c9b5a9 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
2011-07-21 14:50:29 -07:00
Mathias Agopian
c10d9d90b2 clean-up. get rid ofunused code and members in Surface[Control].cpp
Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
2011-07-20 16:53:13 -07:00
Mathias Agopian
97c602c5af implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"
Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
2011-07-19 15:24:46 -07:00
Mathias Agopian
933389f758 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
2011-07-19 13:05:12 -07:00
Mathias Agopian
ad70186f80 dump GLES strings in SF dumpsys log
Change-Id: I438d511159b2bd915c84954f30574340017d4f47
2011-07-15 14:29:25 -07:00
Mathias Agopian
29a367bb7c take the state transform into account with h/w composer hal
if the state transform didn't preserve rectangles, we
would still try to use h/w composer hal using the bounds
of the transformed rect, which isn't correct.

now we correctly fall back to composition.

Change-Id: Iff78f4339ece415d4987e95a5717b04934d370ab
2011-07-12 14:51:45 -07:00
Jeff Brown
baa44b89ec Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11 22:12:16 -07:00
Mathias Agopian
ffcf465771 fix screen on/off animation (again)
- surfaceflinger now uses the GL-convention of
  placing the origin in the left-bottom corner

- map texture coordinates of the screen capture
  properly

- add the ability to control the animation
  speed through a debug property

Bug: 4989276

Change-Id: Ifb3297bb578078b47146fff666c01f85417e0d6f
2011-07-08 14:37:06 -07:00
Mathias Agopian
6163091a2c Fix EGLUtils::selectConfigForPixelFormat()
- renderscript now calls EGL directly instead of relying on this function
- surfaceflinger also does its own EGLConfig selection
- selectConfigForPixelFormat stays for legacy reason (many tests use it) but
it now only tries to match the alpha channel of the format rather than the
format itself.

this will allow implementations who don't support the exact formats
defined in the HAL to work properly.

Bug: 4998223

Change-Id: Ic664dfc14d5072a514b6f77a115d1521bfc1578f
2011-07-08 14:37:05 -07:00
Mathias Agopian
7e918860f9 Merge "don't kill surfaceflinger when system process dies" 2011-07-06 11:10:31 -07:00
Mathias Agopian
1f339ff387 don't kill surfaceflinger when system process dies
Change-Id: I2d3ed87b590f9ccea3fa4af41d92911de070b315
2011-07-01 17:09:24 -07:00
Mathias Agopian
d9e8c64c3d return an error code with gralloc buffer allocation failures
Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
2011-07-01 14:53:49 -07:00
Mathias Agopian
2dbf9fffb2 fix screen on/off animation, which was flipped
Bug: 4673549
Change-Id: Ia9766754687b89c1ee24b2dbe918c11290ebe038
2011-06-30 16:23:39 -07:00
Mathias Agopian
698c0873cf SF transactions are now O(1) wrt IPC instead of O(N).
Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
2011-06-29 15:05:41 -07:00
Jamie Gennis
67b4cff399 Merge changes I9fb59763,I8b2c6e00
* changes:
  SurfaceTexture: consume buffers after err checks
  SurfaceTexture: change onFrameAvailable behavior
2011-06-28 12:55:03 -07:00
Mathias Agopian
99b49840d3 PermissionCache caches permission checks
This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.

CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.

Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
2011-06-27 17:42:15 -07:00
Jamie Gennis
3d8063b02e 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
2011-06-27 15:45:39 -07:00
Mathias Agopian
ddc31c3e2b fix RefBase so it retains binary-compatibility with gingerbread
Bug: 4595257
Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
2011-06-13 18:39:45 -07:00
Mathias Agopian
a67932fe68 unify SurfaceTexture and Surface
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
2011-06-13 15:51:35 -07:00
Mathias Agopian
342451d19f Merge "Fix a race that could cause GL commands to be executed from the wrong thread." 2011-05-19 19:42:20 -07:00
Mathias Agopian
ca4d3602c0 Fix a race that could cause GL commands to be executed from the wrong thread.
Change-Id: Ia3d407f7bf2f5553f46cfdade70b7b0badb35beb
2011-05-19 19:40:02 -07:00
Jamie Gennis
3629d7ff29 SurfaceFlinger: unfreeze windows for fixed size buffers.
This change makes SurfaceFlinger unfreeze a window if it ever gets a
buffer that is fixed-size.  Normally the window would not be frozen if
its in fixed-size mode, but if the window was frozen before entering
fixed-size mode then it should be unfrozen.

Change-Id: I6bc822d4b02ae51fa8914c1f60f5d24b2002b38d
2011-05-16 16:59:04 -07:00
Mathias Agopian
dea20b1f34 Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
The transaction flags were atomically read-and-cleared to determine if
a transaction was needed, in the later case, mStateLock was taken to
keep the current state still during the transaction. This left a small
window open, where a layer could be removed after the transaction flags
were checked but before the transaction was started holding the lock.
In that situation eTraversalNeeded would be set but only seen during the
next transaction cycle; however, because we're handling this transaction
(because of another flag) it will be commited, "loosing" the information
about the layer being removed -- so when the next transaction cycle due
to eTraversalNeeded starts, it won't notice that layers have been removed
and won't populated the ditchedLayers array.

Change-Id: Iedea9e25fee8dd98a0c5bd5ad41a20fcadf75b47
2011-05-03 20:44:51 -07:00
Iliyan Malchev
697526bc9e frameworks/base: android_native_buffer_t -> ANativeWindowBuffer
Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 16:40:14 -07:00
Mathias Agopian
e4b117ad45 Merge "Fix a race-condtion in SurfaceFlinger that could lead to a crash." 2011-05-03 16:34:06 -07:00
Mathias Agopian
4f11374018 Fix a race-condtion in SurfaceFlinger that could lead to a crash.
Client::mLayers could be accessed from different threads.
On one side from Client::attachLayer() which is currently
called from a binder thread; on the other side from
Client::detachLayer() which is always called from the main
thread.

This could lead to a corruption of Client::mLayers.

We fix this issue by adding an internal lock to Client.

Change-Id: Ib1317d7750ed5030e6f577efe34b69fc10198bd3
2011-05-03 16:21:41 -07:00
Conley Owens
5511a49d8d am 08acaec6: am a47c0d29: am 58e4a5e2: Merge "Fixed to draw texture when loadTexture() is called at first time"
* commit '08acaec6df66bd6a12b1e63016ed998abff4afdc':
  Fixed to draw texture when loadTexture() is called at first time
2011-05-02 10:12:00 -07:00
Conley Owens
7badf9c5e8 am a47c0d29: am 58e4a5e2: Merge "Fixed to draw texture when loadTexture() is called at first time"
* commit 'a47c0d29bec7c242fb8d5ffe206c4c6ff85a178a':
  Fixed to draw texture when loadTexture() is called at first time
2011-04-29 17:15:35 -07:00
Conley Owens
e85e4d4ed2 Merge "Fixed to draw texture when loadTexture() is called at first time" 2011-04-29 10:00:12 -07:00
Conley Owens
56b79aa816 Merge "Fixed to call computeVisibleRegions() when transparent value changed" 2011-04-29 09:59:30 -07:00
Conley Owens
345c6114da am ba5aebd1: am ac505b86: am f0556bb9: am 86d1d747: Merge "Add lock before calling initEglImage"
* commit 'ba5aebd106c61567ad6be905efd18902025735aa':
  Add lock before calling initEglImage
2011-04-27 13:54:08 -07:00
Conley Owens
ddc25bb92e am ac505b86: am f0556bb9: am 86d1d747: Merge "Add lock before calling initEglImage"
* commit 'ac505b86b45462d9883f9c36fad0ef85e0885ee4':
  Add lock before calling initEglImage
2011-04-27 13:41:12 -07:00
Conley Owens
a97b487178 am 86d1d747: Merge "Add lock before calling initEglImage"
* commit '86d1d74762e65b6f64c2d4758aa5fd4af6275696':
  Add lock before calling initEglImage
2011-04-27 12:43:19 -07:00
Mathias Agopian
0ef4e15a6c Get rid of the "pid" parameter from createSurface
Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
2011-04-20 14:26:11 -07:00
Mathias Agopian
d9071ad304 Merge "remove support for console in SurfaceFlinger" 2011-04-19 18:19:15 -07:00
Mathias Agopian
3d031507e9 remove support for console in SurfaceFlinger
the only supported screen management api now is
/sys/power/wait_for_fb_{sleep|wake}

Change-Id: I6c7d8d54843da4980b1b38ee3d46cf19be275240
2011-04-18 18:09:53 -07:00
Mathias Agopian
3d64e738b9 fix memory corruption when retriving GL_MAX_VIEWPORT_DIMS
Change-Id: I2e0b1eac6dbc6a4ecbbaf31013aa02cf2369fce2
2011-04-18 15:59:24 -07:00
Kobi Cohen Arazi
0d11baf889 Add lock before calling initEglImage
Without that lock, there is a chance of race condition
where while composing a specific index, requestBuf with
the same index can be executed and touch the
same data that is being used in initEglImage.
(e.g. dirty flag in texture)
2011-04-15 10:38:33 -07:00
Mathias Agopian
4cb18881b5 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
2011-04-08 19:28:04 -07:00
Mathias Agopian
47d8730a24 remove more unused references to ISurface
Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
2011-04-05 20:11:55 -07:00
Ichitaro Kohara
dcab18c9c1 Fixed to draw texture when loadTexture() is called at first time
SW renderer of Stagefright reaches loadTexture() to draw image.
The first time loadTexture() is called, it just initializes OGL
texture, then returns. Thus, the first time call doesn't draw.
This patch fixes to move on to draw stage after the initialization.

Change-Id: I3ec1ad68fb8d376a4ad7aefded1c18a002d175c4
2011-04-05 08:58:44 +02:00
Mathias Agopian
d87f162026 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
2011-03-25 18:42:40 -07:00
Jamie Gennis
3eb70b4a51 am bd340c7b: am b368f4d8: am 38caff23: Merge "SurfaceFlinger: Fix a typo." into honeycomb-mr1
* commit 'bd340c7b492fcf7d0a6cccab8825e710c83fe76d':
  SurfaceFlinger: Fix a typo.
2011-03-18 17:38:37 -07:00
Jamie Gennis
d32a694a0c Merge "SurfaceFlinger: Fix a typo." into honeycomb-mr1 2011-03-18 17:32:25 -07:00
Jamie Gennis
5fd799dab6 SurfaceFlinger: Fix a typo.
This change makes Layer skip its cleanup of its old shared memory region
when the UserClient object that owned the memory has been freed.

Bug: 3429357
Change-Id: I9e4d8eb190f6914dc043674b9bb8dd28e959901b
2011-03-18 16:35:13 -07:00
James Dong
02cc7170a2 am 14438b81: am 970bad67: am be368de7: Merge "Fix missing AOSP copyright headers for more files" into honeycomb-mr1
* commit '14438b81a1fe4d7ebdf8977f3d80a1dd1867c5ad':
  Fix missing AOSP copyright headers for more files
2011-03-17 18:06:51 -07:00
James Dong
5f7204cb66 Fix missing AOSP copyright headers for more files
o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp
  because these two files were moved from other places to the current location,
  and were actually created in 2010.

bug - 4119349

Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
2011-03-17 14:43:12 -07:00
Mathias Agopian
939fee8819 am e22aa623: am 25594e19: am f40e638e: fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
* commit 'e22aa62362a3007ee59ac62d4b5969e216987995':
  fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
2011-03-17 00:13:49 -07:00
Mathias Agopian
d0b55c011a fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
a memory corruption happned when the buffer pool was resized
(like when playing a video or using camera) and there was
no current active buffer. In this case, the faulty code
would index into an array at position -1 which corrupted
24 bytes of data.

also improved region validation code (ifdef'ed out by default)

Bug: 4093196
Change-Id: I915c581d131148959d720e00e3892e9186ab733d
2011-03-17 00:04:42 -07:00
Mathias Agopian
1bbafb9610 Fix some const-ness and comments
mDrawingState doesn't need to be accessed by the
mStateLock, because by definition it's only accessed
from the main thread.

Similarily, the list of layers in the drawing state
cannot change (ie: is const).

Change-Id: I2e5da7f4d8caee7af7802b432cd45cc81c7c08b0
2011-03-11 17:01:40 -08:00
Mathias Agopian
5bf3abefb2 Fix initialization order warning.
Change-Id: I794dfaaa3a2f2645a89abc6c45de5f76e485f7d0
2011-03-11 17:01:40 -08:00
Eric Hassold
795f5ccf47 Merge "Default to NONE format in Layer" 2011-03-11 15:08:16 -08:00
Eric Hassold
7ffe380750 Default to NONE format in Layer
mFormat is not initialized with any value in Layer constructor, causing
a call to requestFormat() with no explicit format specified to fallback to
some uninitialized value. Such invalid path actually detected by valgrind.

Change-Id: Ib7faabcd61eaa26fb0ae7a9a486d9e258ba31b63
2011-03-11 12:24:23 -08:00
Jamie Gennis
7a4d0dfd43 SurfaceFlinger: Respect the PROTECTED gralloc bit.
This change makes SurfaceFlinger treat layers for which the active
buffer has the GRALLOC_USAGE_PROTECTED bit set as if they have the
'secure' flag set.

Change-Id: Ic60b6513a63e4bb92ec6ce9fd12fd39b4ba5f674
Bug: 4081304
2011-03-10 16:25:48 -08:00
Mathias Agopian
18570db84e am 33029221: Merge "revert the surface purgatory list and dependent changes." into gingerbread
* commit '33029221619f14577bd0d0e7c2f815abc8f1b8ea':
  revert the surface purgatory list and dependent changes.
2011-03-09 17:11:10 -08:00
Mathias Agopian
f7662afb76 revert the surface purgatory list and dependent changes.
6d0f6cb Revert "Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only"
6154412 Revert "partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)"
37c2a37 fix [3408713] Dialog window invisible sometimes

It looks like there is a surface leak, it's unclear where it is.
Without those reverts, this would cause a leak of the associated buffers
which is far more problematic. this change might hide the surface leak.

Bug: 4078032
Change-Id: Iedcda3ffcdd2f69d41047b5c3134c1e867ff90d7
2011-03-09 17:00:41 -08:00
Jamie Gennis
134f042286 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
2011-03-08 16:49:51 -08:00
Mathias Agopian
5f1e78d730 am df6410dc: Merge "Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only" into gingerbread
* commit 'df6410dce3dae0bdb7e13118b3878079a1dcce03':
  Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
2011-03-07 18:04:06 -08:00
Mathias Agopian
ee65ac8a71 Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
37c2a37 fix [3408713] Dialog window invisible sometimes
d35c666 fix [3385504] Surface flinger hang when adding dim surface
1723b04 fix [3389263] OMX.Nvidia.h264.decode fails to shutdown
1b0114f fix a surface leak in SurfaceFlinger

Bug: 3513017

Change-Id: Ia13ed8c9cdcb1f484e177cdcaff687e7c88a10c3
2011-03-07 16:56:16 -08:00
Mathias Agopian
1c71a47a6d remove some logs
Change-Id: Ia476184048ee419e19330a56dc8e6553189f6a24
2011-03-02 18:45:50 -08:00
Jamie Gennis
e7809762e1 am 0dc5fdb9: am e630e5f4: am 919853ce: Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread
* commit '0dc5fdb9b2fd3b3e2ede5e9607bc21423f357a01':
  Prevent SurfaceFlinger from using layer token 31.
2011-02-27 16:04:42 -08:00
Jamie Gennis
d1ad86f66b am e630e5f4: am 919853ce: Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread
* commit 'e630e5f49ba15005172dceeda7299569b2d2351f':
  Prevent SurfaceFlinger from using layer token 31.
2011-02-27 15:55:21 -08:00
Jamie Gennis
db7b742f65 am 919853ce: Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread
* commit '919853ce244f853966817d4adb2f3b7b6e4bbe74':
  Prevent SurfaceFlinger from using layer token 31.
2011-02-27 15:44:36 -08:00
Eric Hassold
ab0225e330 Merge "Correctly handle translucency of device-specific pixel formats" 2011-02-23 14:10:04 -08:00
Ichitaro Kohara
2168e2de24 Fixed to call computeVisibleRegions() when transparent value changed
When some Surfaces are overlapping and one of them changed to
transparent or opaque, the back Surfaces should appear or
disappear. This patch calls SurfaceFlinger::computeVisibleRegions()
to re-calculate region of each Surface to implement the behavior.

Change-Id: Iffb1caf1b4ce28dff252e114fe5b9b07d9c84a6f
2011-02-17 12:31:23 +01:00