summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Fix HDMI unblank behaviorAndy McFadden2012-10-102-2/+4
| | | | | | | | | | | | | | | | | | | Two issues: (1) We were announcing the hotplug event before we were ready to handle blank/unblank events, so we were losing the initial unblank that power manager sends us when HDMI is first plugged in. This left the display blank until you toggled the device power off/on. (2) We were retaining fbTargetHandle for HDMI after the display was disconnected. The value didn't get updated when HDMI was reconnected because the display was blank, so we didn't go through that code path. So, when HDMI was re-connected, we passed stale data into the HWC. Bug 7323938 Change-Id: I2335d24fd7b0f00bb23fc63aa7bcf44cb8857c73
* Merge "fix typo that prevented proper loging of EGL error code" into jb-mr1-devMathias Agopian2012-10-091-1/+1
|\
| * fix typo that prevented proper loging of EGL error codeMathias Agopian2012-10-091-1/+1
| | | | | | | | | | | | | | needed for investigating 7309949 Bug: 7309949 Change-Id: If29a5c08d0e87f46b44ba2e1030be61cb4d1403b
* | don't automatically unblank external displaysMathias Agopian2012-10-091-6/+0
|/ | | | | | | | | | this should be handled by the display-manager. we were doing that in SF because until recently we didn't have enough support in the HAL. however, this is now causing other problems when plugging hdmi while the screen is off for instance. Bug: 7150885 Change-Id: I739b209056a765d38d05295cf202f67ee0f506ae
* fix dumpsys Layer name when using multiple displaysMathias Agopian2012-10-084-5/+16
| | | | | Bug: 7288401 Change-Id: I14beeef58fac5270cef3b611e18c163060efe6c3
* fix SurfaceFlinger DDMS debuggingMathias Agopian2012-10-072-3/+4
| | | | | | | | | DdmHandleAppName.setAppName() signature changed which broke this debugging feature. Needed for debugging b\7267680 Change-Id: I4482bf5a441e91bef89d1ddea9a4152333be7f88
* Tone down a fatal assertAndy McFadden2012-10-041-2/+5
| | | | | | | | | The new disconnectDisplay function doesn't handle virtual displays, but it may be called for them. Return without doing anything. Bug 7281786 Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566
* Ignore display state changes for disconnected displaysJesse Hall2012-10-041-1/+5
| | | | | | | | | | | When a display is disconnected, removing it from SurfaceFlinger's display list is non-atomic with removing it from the Display Manager and any in-flight transactions. So SurfaceFlinger might get a display state change transaction for a display it has already forgotten about. Just ignore these. Bug: 7288082 Change-Id: Ic27e55377f3db40fb34e3b1cd67e43297df117a2
* make sure we don't call into the HWC HAL when not neededMathias Agopian2012-10-045-24/+47
| | | | | | | | | when enabling/disabling vsync we now make sure to not call into the HAL if the state wouldn't change. Bug: 7274951 Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf
* Fix crashes after HDMI disconnectAndy McFadden2012-10-043-0/+25
| | | | | | | | | | | | | | | | | The display was being removed from SurfaceFlinger's list before we had a chance to reset HWComposer's layer list, so we were passing stale data into the hardware composer (which has its own per-display data). This resulted in "invalid gralloc handle" complaints. We now clear the layer list immediately after removing the display. The display was being removed while its EGLSurface was still "current", resulting in "cancelBuffer: BufferQueue has been abandoned" complaints. We now call makeCurrent on the primary display before removing the external display. Bug 7274254 Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
* Add Fence::waitForever which logs a warning timeout, and use itJesse Hall2012-10-021-1/+1
| | | | | Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
* Revert "improve sensor fusion" -- DO NOT MERGEMathias Agopian2012-10-011-56/+9
| | | | | | | | | | | This reverts commit bdf277355dcd647bd5d27b38fc107243a2247a02. This reverts commit dc5b63e40ee697324d39fe105d6f12c2bb031fc6. it might be responsible for a regression that makes the rotation vector spin. Bug: 7267330 Change-Id: Ifb10e933537e70c1d85a7ba73a7e3ae59002fe62
* SurfaceFlinger: reset the FB_TGT acquire fenceJamie Gennis2012-10-011-0/+1
| | | | | | | | | | This change makes SurfaceFlinger reset the acquire fence fd to -1 after each call to HWComposer::commit. The HWComposer implementation is resonsible for closing the fd, so SurfaceFlinger should make sure not to pass it to HWC multiple times. Change-Id: I79554d9f6d6ef2b77d632d40251516c1f5b16ddb Bug: 7258954
* save/restore viewport properly when taking screenshotMathias Agopian2012-09-302-1/+4
| | | | | Bug: 7241739 Change-Id: Iba8b9ffc75ab47fbc56169e65da26d96850a9297
* reset GL viewport and project when caputring the screenMathias Agopian2012-09-283-7/+15
| | | | | Bug: 7241739 Change-Id: I3bb5214b070384de9be2026647865c6c236a4331
* Pass display arg to blank/unblankAndy McFadden2012-09-284-37/+74
| | | | | | | | This allows us to blank and unblank displays other than the built-in display (e.g. HDMI). Bug: 7240511 Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
* SurfaceFlinger: don't always set HWC_GEOM_CHGDJamie Gennis2012-09-271-21/+35
| | | | | | | | This change fixes a bug in SurfaceFlinger that caused the HWC_GEOMETRY_CHANGED flag to be set every flip. Change-Id: I4f395a2883bcbb53b23b3d14941aff108739c9f0 Bug: 7234237
* Merge "Recompute visible regions more vigorously" into jb-mr1-devAndy McFadden2012-09-261-3/+3
|\
| * Recompute visible regions more vigorouslyAndy McFadden2012-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | Some of the code in latchBuffer was calling invalidateHwcGeometry, but that didn't cause the SurfaceFlinger visible region code to re-evaluate the layer's visibility. Set the recomputeVisibleRegions "out" parameter instead. Bug 7235797 Change-Id: If6ba33fbd1a594cd64cc5253aebf752d6ceda1c9
* | Stop using transparent region for computing visible regionsJesse Hall2012-09-263-10/+35
|/ | | | | | | | | | | | | | | | | | | | | | The transparent region hint is computed only from view layout locations, ignoring post-layout translation. If a SurfaceView is layed out with no other views above it, but a view is moved above it post-layout, that view's layout bounds would be subtracted from the window's transparent region instead of its drawing bounds. Prior to this change, the view would not be visible (except where its layout bounds and drawing bounds overlap). With this change, composition uses visible regions computed without regard to the transparent regions. However, if all of a layer's visible region is transparent, it will be removed from the list of layers to composite. This doesn't fix the root problem of incorrect transparent regions, and doesn't prevent bad composition in all cases. But it does avoid it for some existing apps, whiel still allowing the transparent region hint to save power in the important fullscreen-video-in-a-SurfaceView case. Bug: 7179570 Change-Id: I47cf939e12129b167afa344b8b036e8827103ac8
* Merge "add support for EGL_FRAMEBUFFER_TARGET_ANDROID" into jb-mr1-devMathias Agopian2012-09-252-24/+95
|\
| * add support for EGL_FRAMEBUFFER_TARGET_ANDROIDMathias Agopian2012-09-252-24/+95
| | | | | | | | | | | | | | | | | | | | we now try first with EGL_FRAMEBUFFER_TARGET_ANDROID, and pick the first config we find. Otherwise, we revert to the old algorithm. Bug: 7232584 Change-Id: I8d5c5a4ce48420832c2e2828718a8f53325effb0
* | only abort when errors happen on the main displayMathias Agopian2012-09-251-5/+8
|/ | | | | Bug: 7232690 Change-Id: I2c4b35a82f131da26deea738ef294e100e536d15
* fix a crasher when running out of memoryMathias Agopian2012-09-251-1/+1
| | | | | | | | | | MemoryHeapBase::getBase() returns MAP_FAILED in case or OOM, not null which is what SF was checking against. This addresses one of the issues of bug 7230543. Bug: 7230543 Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577
* When "show visible regions" is enabled we were missing a call to HWCMathias Agopian2012-09-251-0/+6
| | | | | Bug: 7204034 Change-Id: I64dd78362fa75149513a7d9ff92dde175e9b4958
* Show build config in dumpsys SurfaceFlingerAndy McFadden2012-09-252-0/+32
| | | | | | | | | | | | | This adds a line to the "dumpsys SurfaceFlinger" output that shows build-time configuration values. Example: Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \ [libgui USE_FENCE_SYNC] Bug 7206633 Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
* fix Layer croping in SurfaceFlingerMathias Agopian2012-09-241-12/+11
| | | | | Bug: 7224628 Change-Id: I9421f0a06b9a27fe00eefaa1dfab8c4309c380c9
* don't call eglMakeCurrent() before calling HWC commit() on HWC 1.1Mathias Agopian2012-09-241-4/+7
| | | | | | | | this call is not needed and misleading on HWC 1.1; it can also have a negative performance impact when multiple displays are used. Bug: 7124069 Change-Id: I47cd25c9d6e69abcc9333b9ecd5044e8fb1919ec
* handle EGL errorsMathias Agopian2012-09-241-3/+10
| | | | | | | for now we just restart the runtime. bug: 7225248 Change-Id: I7638ffe82075a4db9e7e6f9e35cf48afcb5a387a
* add/remove displays properly on hotplug eventsMathias Agopian2012-09-214-6/+26
| | | | | Bug: 7191563 Change-Id: I8f0fbf3b29658c9479443141798e6f288a1f2d52
* Display events now always carry the display id they happened onMathias Agopian2012-09-212-27/+56
| | | | Change-Id: I12de1d883c23927722bc3a71b782f0079de4e831
* fix an issue where hotplug events were not dispatchedMathias Agopian2012-09-212-15/+31
| | | | Change-Id: I527eec77f338cd6f1a9021aa4c9d384dbddd6d2a
* return an error, as expected, when querying a disconnected displayMathias Agopian2012-09-201-0/+4
| | | | Change-Id: I405a3a7bb42b9bbd2ec7bfe09e60e1b7acf7389d
* fix a typo preventing pre hwc-1.1 devices from bootingMathias Agopian2012-09-201-0/+1
| | | | Change-Id: Icf01254689633d04967872749ac947a671e47ed8
* we now correctly set-up connected screens during bootMathias Agopian2012-09-205-42/+54
| | | | Change-Id: Ie8b1a3b97ad1821cc970e43abe96c8cec7135b66
* We now report hotplug events to the frameworkMathias Agopian2012-09-206-19/+57
| | | | Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
* one more step toward HDMI supportMathias Agopian2012-09-203-35/+54
| | | | | | | | | | | | 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
* calculate wether we filter on a per-display basisMathias Agopian2012-09-205-2/+12
| | | | Change-Id: I79d80b432b20b3d02428da19add464ac1e2b9378
* GraphicBufferAlloc class was declared twiceMathias Agopian2012-09-206-46/+101
| | | | | | | this was confusing because the one in FramebufferSurface wasn't in fact being used Change-Id: Ied45aec20d804cfbe52440f9b2f2852a85c757cf
* Merge "Allow 16-bit color EGLConfigs" into jb-mr1-devJesse Hall2012-09-191-11/+27
|\
| * Allow 16-bit color EGLConfigsJesse Hall2012-09-191-11/+27
| | | | | | | | | | | | | | | | The emulator without GPU acceleration only supports 16-bit framebuffers. Bug: 7185810 Change-Id: I883180367bf5b291d5e70427ab586d2e17868a96
* | Merge changes I561c198c,Id4865f3c into jb-mr1-devMathias Agopian2012-09-196-77/+215
|\ \ | | | | | | | | | | | | | | | * changes: improve sensor battery usage tracking track UID with connections
| * | improve sensor battery usage trackingMathias Agopian2012-09-185-73/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | track UID with connectionsMathias Agopian2012-09-182-4/+8
| |/ | | | | | | Change-Id: Id4865f3cd27a95acdbbfdff1f2bb4123f312a13b
* | fix typo in DisplayDevice logsMathias Agopian2012-09-191-1/+1
|/ | | | Change-Id: I593ef674f12073bd9d690946447031394ef9044e
* fix a typo in SensorServiceMathias Agopian2012-09-181-1/+4
| | | | | | | | 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
* improve logging of external displaysMathias Agopian2012-09-183-28/+29
| | | | Change-Id: I041aebb7fc655aeca98bbf698d15e05d7c12cac9
* suppress superfluous logMathias Agopian2012-09-181-2/+0
| | | | Change-Id: I838f2de4cf99e885833c4f42e2a69d6e3bb8eea5
* Merge "Check that HWC exists before trying to use it" into jb-mr1-devJesse Hall2012-09-181-3/+3
|\
| * Check that HWC exists before trying to use itJesse Hall2012-09-181-3/+3
| | | | | | | | | | Bug: 7185810 Change-Id: I1271d6ba397f3abf0ef166b8d03b9b26b72e28d7