summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Avoid context priority for S5PC110 and OMAP4 boardsPaul Kocialkowski2013-10-291-8/+0
| | | | | Change-Id: I2d85115b69c4f75caaae599e0db6074e55f0439b Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* Abort surface composition if hw surface is invalidMichael Chock2013-05-311-1/+5
| | | | | | | | If an invalid display device is detected during surface composition (e.g., a simulated secondary display is removed), abort the composition. Change-Id: Ia6afb2e287882d8ae0614eb25463d3f85b687adf
* native: add flag to disable legacy sensors fusionDaniel Hillenbrand2013-05-012-0/+9
| | | | | | | Causes problems on all p31xx devices. http://pastebin.com/PabjFVWP Change-Id: Iac9a913e0984d7e9e419772215d3fb3d1a0cb5e8
* Merge "sensorservice: Add legacy sensors fusion." into cm-10.1Ricardo Cerqueira2013-04-2110-0/+690
|\
| * sensorservice: Add legacy sensors fusion.Rudolf Tammekivi2013-02-0210-0/+690
| | | | | | | | | | | | | | | | This change allows devices with accelerometer & magnetometer but without gyroscope to still get virtual sensors such as Gravity, Linear Acceleration and Rotation Vector. Change-Id: Ibb90b70845c766ab52c843557446e34649a7d6d9
* | DisplayDevice: initialize mDisplayToken correctlyChih-Wei Huang2013-04-181-0/+1
| | | | | | | | | | | | mDisplayToken should be initialized by displayToken. Change-Id: I0a5fec1f1732200a32d10b1575239dceffe6dee4
* | Forward-port surface dithering from CM10Steven Luo2013-04-065-2/+52
| | | | | | | | | | | | | | | | | | | | | | This allows the use of 16-bit color displays without excessive color banding; behavior can be controlled by the persist.sys.use_dithering property. Incorporates http://review.cyanogenmod.org/19532 from CM10 as well as code removed in upstream commit 1b03149. Change-Id: I290ca4ed4787dc81ac756d9af92cd6a690865a08
* | SurfaceFlinger: Removal of NO_RGBX_8888 flag for OMAP3Krylon3602013-03-311-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing this will allow color format of surface to be set for RGBX8888 that can improve performance for 32 bit framebuffer. Tested on Nook Color with CM10 TI's commit can be found here: review.omapzoom.org/#/c/21374/3 This will also remove the need to have BOARD_NO_RGBX_8888 := true in the BoardConfig.mk Change-Id: Ibc6e56c992a6433bc8688d88471d4feb9084278c
* | Add support for custom buffer sizes.Ramkumar Radhakrishnan2013-03-102-0/+20
| | | | | | | | | | | | | | | | Add native window properties NATIVE_WINDOW_SET_BUFFERS_SIZE to the perform function of SurfaceTextureClient to set the user defined size of graphic buffers. Change-Id: I1dc2203990a3641fbb9ddab9a86f7e9017f05270
* | Revert "SurfaceFlinger: Change to support framebuffer flip for 2D blitters"Steve Kondik2013-03-062-9/+0
| | | | | | | | This reverts commit f442ef1dfc17ca56b88c68c318599942f94e1d68.
* | Merge tag 'android-4.2.2_r1' of ↵Steve Kondik2013-02-157-24/+72
|\ \ | |/ |/| | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/native into 1.1 Android 4.2.2 release 1 Conflicts: libs/ui/GraphicBufferAllocator.cpp Change-Id: Id60a6580bf5a3ba04f8e1e2b1b950e0b93888166
| * make transform hint multi-display awareMathias Agopian2012-11-214-23/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if a layer is not mirrored, we now use its display as the source for the transfrom hint calculation instead of always using the default (main) display. this change does two thing: 1) we make updateTransformHint take a DisplayDevice as a parameter instead of hard-coding the main display. 2) each time we do a transaction that could change the hint, we go through all layers and figure out which display should be used for their transform hint. Bug: 7599344 Change-Id: I9b04a95e6c372dd770bacf81d8ef6f8e31b87b83
| * workaround: don't reset compositionType to HWC_FRAMEBUFFER [DO NOT MERGE]Mathias Agopian2012-11-191-1/+1
| | | | | | | | | | | | | | | | This workaround a HWC HAL issue in Nexus 7, which causes videos and live wallpapers to animate slowly. Bug: 7563862 Change-Id: I16ad85317e3e7f47f005e7397357c14186b0a13d
| * Reset compositionType to HWC_FRAMEBUFFER before calling prepare()Mathias Agopian2012-11-143-1/+5
| | | | | | | | | | | | Honor the documentation. this broke in JB-MR1. Change-Id: I841a93b409fc940374bc748c4e143d82a192669c
* | SurfaceFlinger: Change to support framebuffer flip for 2D blittersArun Kumar K.R2013-01-232-0/+9
| | | | | | | | | | | | | | | | | | - Surfaceflinger does not flip framebuffers when there are no layers marked for HWC_FRAMEBUFFER - This change checks for the HWC_BLIT flag and will request a flip to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c
* | sensordevice: Dummy ALS: Solve fortified libc warningRicardo Cerqueira2013-01-021-1/+1
| | | | | | | | | | | | convert sprint to snprintf, the size of the writes is always known Change-Id: I53ee36b67544ac25de7e5c05ce90b6817c8a9c92
* | sensors: Add dummy light sensorRicardo Cerqueira2013-01-022-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have a sysfs toggle for the lightsensor instead of passing the LUX values for userspace processing; for those, use BOARD_SYSFS_LIGHT_SENSOR:=<sysfs path> This is necessary for the rest of userspace to recognize its existence and toggle it for auto-brightness. It doesn't generate actual light values, though; all backlight adjustments are made in-kernel. Change-Id: I0e546b4740720bd34d1e1d85a96b295fcc697106 sensors: dummy ls: set unique handle handles and types are usually the same, but it's not mandatory. Sony DASH use custom handles, and the previous assumption broke Proximity sensor on Sony devices. Change-Id: I954e13765f42341e6b5393a12556f6a007c4e494
* | ui/sf: Add support for exynos HDMIRicardo Cerqueira2012-12-303-1/+28
| | | | | | | | Change-Id: I27b34e95c04750e3dd321a2183b6cc1d89f29b5d
* | Revert "remove support for HWC < 1.0"Ricardo Cerqueira2012-12-121-74/+343
| | | | | | | | | | | | | | | | This partially reverts commit 30bcc61431d8e3bef779472dd52a7b156dcaba09 and updates to the current API. Tested on 0.1 blobs from Tegra2/3 and OMAP3/4 Change-Id: I43cee8852b266d68d1edefbe7ac988b9dbcf7227
* | Merge "surfaceflinger: odd hw rotation (90/270) patch for swapping ↵Ricardo Cerqueira2012-12-121-4/+15
|\ \ | | | | | | | | | width/height" into mr1-staging
| * | surfaceflinger: odd hw rotation (90/270) patch for swapping width/heightHashcode2012-12-101-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch works in addition to the following commit re-implementing ro.sf.hwrotation: https://github.com/CyanogenMod/android_frameworks_native/commit/7d283431efffc4402cb1a6cacf5da64729c883bb When using values of 90 and 270 for ro.sf.hwrotation the LCD width and height also need to be swapped to display properly. NOTE: This patch does not fix the initial startup of bootanimation Change-Id: Iab9de66348967a378dd73a41bc96d632f750386c Signed-off-by: Hashcode <hashcode0f@gmail.com>
* | | DisplayDevice: Backwards compatibility with old EGLAndrew Dodd2012-12-102-0/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 4.1 to 4.2, the display subsystem was reworked to use SurfaceTextureClient/BufferQueue instead of FramebufferNativeWindow for the framebuffer itself. Unfortunately, some legacy EGL libraries make assumptions that any framebuffer device will be FramebufferNativeWindow. These EGL libraries will fail when used in 4.2 as if the framebuffer is not FramebufferNativeWindow, they will try to dequeue more than one buffer at a time, which will cause a hang of the graphics subsystem. This allows use of FramebufferNativeWindow to keep legacy EGL implementations happy. Confirmed EGL implementations that need this include but are not limited to: Set BOARD_EGL_NEEDS_LEGACY_FB to use Tegra2/3 ICS EGL Mali400 ICS EGL (Allwinner A10) Mali400 Jellybean (4.1) EGL (Samsung Exynos4) Original implementation by OndraOrg of XDA: http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19 Change-Id: I74005cf6753b3c9bfb4c1e32fb641f5167787917
* | Sensor: Add RotationVectorSensor2Pawit Pornkitprasan2012-12-054-0/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ported from 4.1) Some ICS apps (namely, Google Maps) expects a rotation vector to be available. Newer devices, this is provided by either Android's sensor fusion (requires Gyro) or by hardware sensor fusion (MPL). Older devices will lack this virtual sensor and compass in Google Maps will not work. To fix this, we can provide our own rotation vector sensor by converting the values from the orientation sensor. (They are basically the same information in different formats.) Thanks to Unhelpful for the help with related math. Change-Id: I39489b3a5ce7c7d890768614357f32cc491bd6d9
* | surfaceflinger: Reimplement hwrotationRicardo Cerqueira2012-11-261-0/+15
|/ | | | Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
* fix transitions from hwc to GLES compositionandroid-sdk-support_r11Mathias Agopian2012-11-051-4/+4
| | | | | | | | | | | | | If we switched from HWC to GLES but the dirty region was empty (could happen if the dirty region is outside of the screen for instance), we need to force a full screen composition. In this change we ignore the dirty region for the purpose of rejecting the whole update and we rely on the fact that it will later be expanded to the whole screen. This was the least risky fix. Bug: 7467760, 7452931 Change-Id: I2132f2f963b00a3ce7150adadb107b0367b3862e
* partially implement external display clippingMathias Agopian2012-10-251-0/+25
| | | | | | | | | | | we perform external display clipping only on the GL side (ie: not done on the h/w composer side, which is harder and would be too risky). in practice this means that WFD will be clipped properly, while HDMI *may* or may not depending on how hwc is used. Bug: 7149437 Change-Id: I92d4d04220db72b6ffb134c7fa7a93af569723a5
* prevent a client from crashing surfaceflingerMathias Agopian2012-10-221-2/+17
| | | | | | | | | a misbehaving or malicious client could cause SF to crash by providing a "fake" IInterface. we now check the IInterface we get is our own and local. Bug: 7278879 Change-Id: Ia19d05902d4b2385c5a16416148378d4998833fd
* Merge "SurfaceFlinger: add support for secure displays" into jb-mr1-devJamie Gennis2012-10-227-42/+65
|\
| * SurfaceFlinger: add support for secure displaysJamie Gennis2012-10-227-42/+65
| | | | | | | | | | | | | | | | | | This change adds support for displays that are not allowed to display surfaces with the eSecure flag set. All non-virtual displays are considered secure, while virtual displays have their secure-ness specified at creation time. Bug: 7368436 Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
* | Fix emulator vsyncAndy McFadden2012-10-191-5/+12
|/ | | | | | | | | | | | | | The code that reserves display IDs was only run when a hardware composer was present. The eventControl() function, which handles enabling of vsync, was ignoring the request because the primary display didn't appear in its set of allocated IDs. This moves reservation of IDs for built-in displays outside the HWC-only block. Also, added a couple of warnings in eventControl(). Bug 7376568 Change-Id: I185ccdf817a25499b5c2668f8f6d594afb8c1568
* SurfaceFlinger: change the animation timeoutJamie Gennis2012-10-171-3/+5
| | | | | | | This change changes the animation transaction timeout from 500us to 5s. Bug: 7362633 Change-Id: I9bed8e74f726dae2daa398afc29babcea00d5b04
* fix a corruption in blank/unblankMathias Agopian2012-10-152-32/+39
| | | | | | | | | | | | we were holding a reference (ie: pointer) to a sp<DisplayDevice> while processing the message. Meanwhile the object itself could go away and we would end up accessing a dead object. the root cause of the problem is that we are accessing mDisplays[] in a few places outside of the main thread. Bug: 7352770 Change-Id: I89e35dd85fb30e9a6383eca9a0bbc7028363876c
* Merge "SurfaceFlinger: add animation transactions" into jb-mr1-devJamie Gennis2012-10-152-7/+28
|\
| * SurfaceFlinger: add animation transactionsJamie Gennis2012-10-152-7/+28
| | | | | | | | | | | | | | | | | | | | This change adds a transaction flag for WindowManager to indicate that a transaction is being used to animate windows around the screen. SurfaceFlinger will not allow more than one of these transactions to be outstanding at a time to prevent the animation "frames" from being dropped. Bug: 7353840 Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
* | Always set vertex alpha when drawing screenshot layersJesse Hall2012-10-151-1/+2
|/ | | | | | | | The screenshot is a GL_RGB texture, and the GL_REPLACE texture env mode uses vertex alpha for GL_RGB textures instead of alpha=1.0. Bug: 7340077 Change-Id: I6fbb907023e48f9c422b15a33da79757d6726840
* Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-devJamie Gennis2012-10-123-3/+9
|\
| * SurfaceFlinger: make the num FBs a board configJamie Gennis2012-10-123-3/+9
| | | | | | | | | | Bug: 7283132 Change-Id: I38116f39fc18212f2daab94bbfc3daaf89439fc4
* | Assume LayerScreenshot has pre-multiplied alphaJesse Hall2012-10-101-4/+4
|/ | | | | Bug: 7300129 Change-Id: Ie9114adc4b5c9a8cc3c65bfe6d9478b2cba4e0d8
* 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