Commit Graph

298 Commits

Author SHA1 Message Date
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 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 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 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
Mathias Agopian 55ef343331 remove dead/usnused code
Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
2012-01-11 22:03:41 -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 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 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 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 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
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 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 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
Mathias Agopian fc60b94db9 fix dumpsys wording for h/w composer
Change-Id: Iaa1094964f2fb83da491e23b9309f7690079c17e
2011-09-22 16:26:39 -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 fb4d5d5726 improve hwc dumpsys
we now log the buffer's format

Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
2011-09-20 17:53:33 -07:00
Mathias Agopian 22da60c3e6 Improve SF dumpsys output wrt HWC
Change-Id: Ibdb7930fa3b521bfd3f44750ed98cfd75f9a01fe
2011-09-09 00:49:44 -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 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
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 1f339ff387 don't kill surfaceflinger when system process dies
Change-Id: I2d3ed87b590f9ccea3fa4af41d92911de070b315
2011-07-01 17:09:24 -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
Mathias Agopian a5529c8778 remove support for PUSH_BUFFER surfaces and overlays
the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
2010-12-08 16:13:59 -08:00
Erik Gilling 1d21a9cafc surfaceflinger: add support for gralloc dump hooks
Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
2010-12-08 15:40:11 -08:00
Mathias Agopian 47a79466a7 am fb31036f: am 583fefc8: Merge "Use the context_priority extension when present." into gingerbread
Merge commit 'fb31036fd844444c395a2ae9c97439eec9f774e4'

* commit 'fb31036fd844444c395a2ae9c97439eec9f774e4':
  Use the context_priority extension when present.
2010-10-21 13:48:36 -07:00
Mathias Agopian 3c85e4ad5a Merge "Use the context_priority extension when present." into gingerbread 2010-10-20 20:04:46 -07:00
Mathias Agopian e33a35f025 am 5bfa3a34: am 011b5bcc: Merge "implement part of [3094280] New animation for screen on and screen off add support for screen on animation" into gingerbread
Merge commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f'

* commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f':
  implement part of [3094280] New animation for screen on and screen off
2010-10-15 08:33:43 -07:00
Joe Onorato 503d2d4a08 am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbread
Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96'

* commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96':
  Remove dead code, and make the animation a setting.
  turn off the electron beam
2010-10-13 23:34:21 -07:00
Mathias Agopian 9daa5c9b9d implement part of [3094280] New animation for screen on and screen off
add support for screen on animation

Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
2010-10-13 14:28:26 -07:00
Mathias Agopian 59119e658a turn off the electron beam
Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
2010-10-12 14:16:11 -07:00
Mathias Agopian 67226814e1 Use the context_priority extension when present.
Change-Id: I12eadf1e32d576de5d811fba44afa73263e13eef
2010-10-11 18:01:00 -07:00
Mathias Agopian 58959343db Fix a null dereference
Change-Id: I3df446b90c1607782778749de7ba0f8c00698c33
2010-10-07 14:57:04 -07:00
Mathias Agopian 8372785879 dump HWC state in dumpsys
Change-Id: Ifbb38ca1ac9685776250e01c8d02021b35af72cf
2010-09-23 18:13:21 -07:00
Mathias Agopian c479e18db0 resolved conflicts for merge of 48a86240 to master
Change-Id: I2305fef9f4dd46183337217d822df3c675b6b6e5
2010-09-15 12:29:18 -07:00
Mathias Agopian 35b48d10bc Add logging of various important graphics events
There are 16 events logged in the event log:
SF_APP_DEQUEUE_BEFORE
SF_APP_DEQUEUE_AFTER
SF_APP_LOCK_BEFORE
SF_APP_LOCK_AFTER
SF_APP_QUEUE

SF_REPAINT
SF_COMPOSITION_COMPLETE
SF_UNLOCK_CLIENTS
SF_SWAP_BUFFERS
SF_REPAINT_DONE

SF_FB_POST_BEFORE
SF_FB_POST_AFTER
SF_FB_DEQUEUE_BEFORE
SF_FB_DEQUEUE_AFTER
SF_FB_LOCK_BEFORE
SF_FB_LOCK_AFTER

all events log the buffer conserned and a timestamp in microseconds.

by default the logging is not enabled, to turn it on:
adb shell service call SurfaceFlinger 1006 i31 1
adb shell setprop debug.graphic_log 1

The effect is immediate in SurfaceFlinger, but applications need to be
restarted.

Change-Id: Ifc2e31f7aed072d9a7dede20ff2ce59231edbec1
2010-09-13 23:16:58 -07:00
Antti Hatala f5f2712854 surfaceflinger: give hwcomposer a chance to release buffers
Change-Id: I605fa779702022865dd58df3b36f37c2644ade36
2010-09-09 12:06:48 -07:00
Mathias Agopian 000ca8fa9a revert hwcomposer HAL changes. DO NOT MERGE.
This reverts commit:
94364b91a2894bf037b8beb027132fbb812e1434
f8e705dea48f77f1c2532fdbadd4997dd1851af0
b59beb5ca68d0228f60dda60d85e2d0226b33215
e0d5f5bcf5a8b26f4ad75f549cbf380b2c9faf20
2010-08-17 20:22:04 -07:00
Mathias Agopian 45721773e1 Fix a couple issues with the new hwcomposer HAL
- we now clear the framebuffer upon request from the HAL
- the HAL list size could get out of sync with reality
- there was also an issue where sometime we could run past the list

Change-Id: Ic3a34314aed24181f2d8cc787096af83c046ef27
2010-08-12 15:03:26 -07:00
Mathias Agopian f1352df47f should fix sim build, hopefully
Change-Id: I5390bd34dcca36fef43b5169386fff1b04cc842b
2010-08-11 17:31:33 -07:00
Mathias Agopian a350ff9869 call into hwcomposer HAL when present
Change-Id: I70f31c69a9436a43860e78977442863ecba6d27b
2010-08-11 16:08:45 -07:00
Mathias Agopian 81bac09fa6 move native services under services/
moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
2010-07-14 17:59:35 -07:00