summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'cm-13.0' of ↵HEADreplicant-6.0-0001replicant-6.0Wolfgang Wiedmeyer2017-05-021-2/+1
|\ | | | | | | https://github.com/LineageOS/android_frameworks_native into replicant-6.0
| * Fix security vulnerabilityFabien Sanglard2017-04-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | AOSP-Change-Id: I4c9ea3a3177131fa29d2561da71ef18bec3af108 Test: angler, marlin Bug: 32628763 CVE-2017-0546 Change-Id: I3e87518163540a9fce1d4fc3751ed558d4854140 (cherry picked from commit 45b202513ba7440beaefbf9928f73fb6683dcfbd)
* | SurfaceFlinger: disable VSync thread if no clients requiring.Wang, Yue A2017-01-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In EventThread, 2 VSYNCs are needed to do composition and update the client status. So, a 30FPS video may leads to 60FPS VSYNC, which means the DispSync thread would be waked 60FPS. This is a unexpected behavior which takes more power consumption. Now we update the SF status soon after the first VSYNC, which means no extra VSYNC needed, and the DispSync could be awaked as expected, and consequently power get saved. Change-Id: If486eb9b87f109a71f71b510768f15dd733f1233 Orig-Change-Id: I1d3b166021e15a81b2ad770b039761fc2c15fddf Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-12211 Category: aosp improvement Domain: Graphics-SF Origin: internal Upstream-Candidate: yes Signed-off-by: Wang, Yue A <yue.a.wang@intel.com> Reviewed-on: https://android.intel.com:443/238344
* | Merge branch 'cm-13.0' of ↵Wolfgang Wiedmeyer2016-12-1321-63/+710
|\ \ | |/ | | | | https://github.com/CyanogenMod/android_frameworks_native into replicant-6.0
| * surfaceflinger: Add support for Exynos HWC servicesChristopher N. Hesse2016-08-182-0/+50
| | | | | | | | Change-Id: I600e946a22064d64549e266c5a3cf452d0cf6299
| * surfaceflinger: Access s3d flags only for valid display ID.Namit Solanki2016-08-131-0/+3
| | | | | | | | | | | | | | | | - Check if display id is within display ID range. Negative display ids lead to undefined behavior in CTS tests. Change-Id: I2db8caf8d7ac65700e5bc37c180763357cc90aad CRs-Fixed: 1043297
| * surfaceflinger: Fix uninitialized variableSteve Kondik2016-08-032-1/+9
| | | | | | | | | | | | * And don't try to reinit the lib after a failure. Change-Id: Ic055a48670ed8cf01e27b16c5d4ddf214db53d20
| * surfaceflinger: Unbreak casting and other use casesSteve Kondik2016-08-031-0/+4
| | | | | | | | | | | | | | * If QCOM WFD isn't in use, we'll get -1 here. Don't try and dig into the array because we'll get some random memory back. Change-Id: Ib14642fea760dc0e659473bb183c5e0116622302
| * surfaceflinger: Add check for number of queued buffersAnjaneya Prasad Musunuri2016-08-031-1/+6
| | | | | | | | | | | | | | | | Pop buffer item from shadow queue only when number of queued buffer items is greater than zero. Change-Id: I039bc133842293c29e3e130efd65f521ef0049c6 CRs-Fixed: 1009466
| * sf: Fix compliation for non-8996 platformsdianlujitao2016-08-021-0/+6
| | | | | | | | Change-Id: I3edad5934ef9d9ec523e091fa2c959bbc9770f29
| * surfaceflinger: Isolate S3D code to msm8996 onlySteve Kondik2016-08-014-6/+9
| | | | | | | | Change-Id: Ie4b77b55eb306c795b452c59d8ae3383bd2804bc
| * surfaceflinger: Cleanups for blurSteve Kondik2016-08-013-28/+109
| | | | | | | | | | | | * Dynamically load it so no direct linkage or headers are required. Change-Id: I4eba035f527ae4f0fa2485e24a8586145baf0adc
| * sf: Allow HWC composition of virtual displays for HDMI primaryTatenda Chipeperekwa2016-07-311-3/+18
| | | | | | | | | | | | | | | | Allow HWC composition of virtual displays for HDMI primary only when the output pixel format of the HDMI display is RGB. CRs-Fixed: 1007249 Change-Id: I9680b162d844e9e6397f919e8dcc1b1a948d182c
| * SF: Add support to draw S3D framebuffer targetfeifanz2016-07-319-1/+263
| | | | | | | | | | | | | | | | Add support to draw S3D framebuffer target in case HWC driver can not handle due to resource or capability issue. Change-Id: I536fa4a03e246d51891045b692d5dc5be88f2adf CRs-fixed: 999055
| * surfaceflinger: Fix the fix of the opaque check fixSteve Kondik2016-07-241-1/+1
| | | | | | | | | | | | * Use the right define. Change-Id: I78e2aea4bf4ff933ec828cffee1a3e925622ad31
| * SF: Fix NULL pointer dereferencing in dumpDrawCycle()Ramkumar Radhakrishnan2016-07-201-0/+4
| | | | | | | | | | | | | | Check for NULL before dereferencing a pointer in dumpDrawCycle() Change-Id: I1f06214577d0065c988877acb0f1b4378080690f CRs-Fixed: 1018335
| * SF: Add support for all flips of panel mountSaurabh Shah2016-07-204-15/+13
| | | | | | | | | | | | | | | | | | Add support for all flips of panel mount, H, V, HV (180). Property persist.panel.mountflip can be set to 1 for H-Flip, 2 for V-Flip, 3 for HV-Flip (180 / inverse mount). Change-Id: Ide7b8378ad6a423e5d7335fedc27d480a25b53ae CRs-fixed: 990622
| * SF: more DispSync improvements.Haixia Shi2016-07-202-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the reference time to DispSyncThread. Since the phase offset is calculated using timestamps relative to the reference time, we must also adjust the phase offset by the same reference time when computing the next refresh time. Always reset phase offset to zero when updating the reference time because the reference time equals the first timestamp. After beginResync() we need to keep HW vsync enabled until the model is updated. Bug: 25113115 Change-Id: I8eae227bee91c24a99bf8e57fbebceb98d29c77d Test: check in systrace that app/sf vsync events have correct phase
| * SF: use first sample timestamp as reference.Haixia Shi2016-07-202-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not use the absolute 64-bit nsecs_t timestamp directly in phase and error calculations. Compared to the estimated vsync period, the timestamp tend to many orders of magnitudes larger, and consequently the integer modulo operation used to calculate phase and error can be very sensitive to tiny fluctuation in vsync period. Bug: 25113115 Test: set kTraceDetailedInfo=true; see Phase and Error are stable in systrace Change-Id: I687703eec31b1072c606898c0424a96c0a8ca033
| * sf: Fix blending mode for legacy BSPArne Coucheron2016-07-201-1/+1
| | | | | | | | | | | | | | * After 0c5f3af, glitches when blending is observed on A family devices. Modify ifdef to not include QCOM_BSP_LEGACY. Change-Id: Ibb53df5709abbb0e7132065aec23a14f7accf4b3
| * sf: Make sure HWC_BLENDING_NONE is set for opaque layerradhakrishna2016-07-151-0/+4
| | | | | | | | | | | | | | | | Before configuring the layers to HWC, make sure HWC_BLENDING_NONE is set if the layer is opaque Change-Id: Ie84aa9d93e98a244692a0cffc2de653a9079f8b4 Crs-fixed: 957373
| * sf: Only apply hwrotation to primary displaysChristopher N. Hesse2016-06-171-1/+1
| | | | | | | | Change-Id: Ib51030cec5ce7609f12be9a5e46310f75442b680
| * SurfaceFlinger : Ensure position changes are drawn with correct buffer sizeDanesh M2016-05-124-3/+136
| | | | | | | | | | | | | | | | If a single transaction has both positional and size changes, ensure we don't draw any frames using the incorrect buffer size using the updated position. Wait for the correct buffer size and then proceed. Change-Id: I8e25f21f17e0936e66bb5053f85f8336c8464c7b
| * surfaceflinger: Add support for Exynos BGRA mixerChristopher N. Hesse2016-04-272-0/+20
| | | | | | | | Change-Id: Ibc9f784b35a7bd6d8cc6b13ff68b12418cce98c5
| * surfaceflinger: Add support for secondary color matrixSteve Kondik2016-04-122-3/+33
| | | | | | | | | | | | | | | | * Add a new binder transaction for applying a secondary color matrix using RenderEngine. This stacks with the primary color matrix (if set for a11y) to enable GPU-based display calibration. Change-Id: I766455bfb5212e2dcc8ad0cb8ebdddbda87af732
* | surfaceflinger: set a fitting EGL config for MesaWolfgang Wiedmeyer2016-08-251-5/+5
|/ | | | | | Otherwise, the view is distorted and has the wrong colors. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* vds: Allocate Framebuffer target bufferManoj Kumar AVM2016-03-131-1/+9
| | | | | | | | | | Increase frame buffer surface buffers to 3. Call allocateBuffers from the producer so that buffers are allocated. With out this, BufferQueue implementation will only allocate 1 buffer CRs-Fixed: 930504 @Buganizer: 26778657 Change-Id: Id0cadeb78957273d670d63f9956a09454b45eb69
* SurfaceFlinger: Add support for continuous dumpsys to file.Dileep Marchya2016-03-135-0/+131
| | | | | | | | | | | | | | | | | | | | | - Collect dumpsys to an outfile file when triggered. - Collect dumpsys before calling Prepare on hwc module in each draw cycle. Recollect dumpsys if Commit goes through successfully and replace former dumpsys with this. - Wrap around if file size reaches appx 20 MB. - Generate output file at /data/misc/display/dumpsys.txt - Syntax: adb shell dumpsys SurfaceFlinger --file [--no-limit] --file : Ouput dumpsys to file --no-limit : Do not wrap around, keep appending Use same command to trigger start and end of dumping. - Output format: | start code | after commit? | time stamp | dump size | dump data | CRs-Fixed: 947084 Change-Id: Ie520f51c69757aeec88b9400688a7f3271472349
* sf: ex-sf: Remove screenshot surface from secondary displaysArun Kumar K.R2016-03-111-1/+14
| | | | | | | | | | - When rotation animation is disabled on secondary displays, remove the screenshot surface from the secondary display list, without this it would show up upside down frame on secondary. - Mark IntOnly layers as invisible on secondary displays. Change-Id: Ia859ee1c6ac7caa132c95e4f906bd2589e786fac Crs-fixed: 949263
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-102-0/+11
|\ | | | | | | | | | | https://android.googlesource.com/platform/frameworks/native into cm-13.0 Android 6.0.1 release 22
| * Set cpuset from surfaceflinger.Tim Murray2015-11-182-0/+11
| | | | | | | | | | | | | | | | | | | | SurfaceFlinger shouldn't be limited to little cores exclusively, as the binder threads should be placed on big cores when they are in the critical path for a RenderThread. bug 25745866 Change-Id: I9fb65f6d951733f91b4735ff27018411b58b2bfb
* | surfaceflinger: Use only one EventThread when phase offsets are same.Omprakash Dhyade2016-02-291-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceFlinger uses two event-threads to support phase-offsets for application and SurfaceFlinger itself. Extra thread may cause scheduling issues and wake-up latency for either SurfaceFlinger or Application, depending on scheduling, even when running at higher priority as these threads have low-load and qualify for task-packing. Use single event-thread when phase offsets are same. Debug runtime service call behavior change when same phase-offset: 1018 (set phase offset for Application): will change both Application and SurfaceFlinger phase offsets. 1019 (set phase offset for SurfaceFlinger): Will be a no-op. Change-Id: I2514b4ff6249e9bce3eb19f60b1dfe0de12b86d9
* | surfaceflinger: Don't allow QC HWC virtual display without QC HWC copyEthan Chen2016-02-101-0/+6
| | | | | | | | | | | | | | | | | | * QC media encoder appears to be incapable of switching between RGBA8888 buffers and NV12_ENCODEABLE dynamically. This requires that we switch the entire stack to use the QC opaque format, or RGBA8888. REF: CRACKLING-938 Change-Id: Ibd6a8faf8d268d3bfb4d61e4118a778ed82f1ab5
* | surfaceflinger: Correct QTI_BSP ifdefEthan Chen2016-02-101-1/+1
| | | | | | | | | | | | | | * Should be #ifdef, not #if REF: CRACKLING-938 Change-Id: Iaa203413eaf404ba03ba2eb640f6ca93fd8c901d
* | SurfaceFlinger: Move Extended SF classes to same repositoryArun Kumar K.R2016-01-0811-9/+909
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the ExSurfaceFlinger, ExLayer, etc., classes to this repository, to avoid dependency accross projects with static linking The following commits are included in this: commit 04f501b31f627e47ae540b5160b2f86b7adbd921 Author: Baldev Sahu <bsahu@codeaurora.org> Date: Wed Nov 25 18:05:51 2015 +0530 display-fw: Properly initialise mIsGPUAllowedForProtected flag - This flag need to be initialize to false when layer is created. Change-Id: Ie3df40ffc4240c33883f19ecbef6428f7c539b07 CRs-fixed: 942102 commit 09032188751356db295bc5467133ec484dc536cd Author: Arun Kumar K.R <akumarkr@codeaurora.org> Date: Tue Oct 20 10:22:51 2015 -0700 display-fw: Enable checking for INTERNAL_ONLY private flag Check for INTERNAL_ONLY private flag and return correct values from the function isIntOnly Change-Id: I61b44f636412e0ad93e1b3ff18e4accdf90eeafe CRs-fixed: 927880 commit f687ac25b3482b92da3c252d29b65e850cca3ce1 Author: Arun Kumar K.R <akumarkr@codeaurora.org> Date: Thu Oct 15 16:37:11 2015 -0700 display-frameworks: Include libqdutils only for target builds Featurize including libqdutils for targets which uses QCOM_BSP, helps in resolving compilation for emulator builds Change-Id: I39639c3100eb20dd24d2a875bb0e9bc82d2b2d1f commit 4ec765e01be506a8083980fc746a1737bbac4bf2 Author: Arun Kumar K.R <akumarkr@codeaurora.org> Date: Wed Oct 7 18:33:34 2015 -0700 display-fw: Disable rotation animation on secondary displays - Set the animating flag on layer during animation which is used as hint to disable rotation animation on secondary displays. - Set sys.disable_ext_animation to enable the feature - Remove unused definitions in the extended hwc header Change-Id: I7b72c7b605930ea189e047fec17ed18b17d46fdf CRs-fixed: 922304 commit 6998bbdfd7af3126b64897b16b6961e84952601b Author: Baldev Sahu <bsahu@codeaurora.org> Date: Thu Jul 30 16:01:15 2015 +0530 display-frameworks: Extend support for MDP3 - Add support for HWC_BLIT - Allow GPU to compose widevine level 3 Change-Id:I11e03ccd0842d019e85d0c29bc5b7be559fccbaa commit 2fa7aa1684c0162b8226c4327c86c6eaf6b76101 Author: Manoj Kumar <manoj@codeaurora.org> Date: Thu Aug 20 13:52:15 2015 -0700 display-frameworks: Override mOutputUsage with sink Usage flags mOutputUsage flags contain default usage flags and doesnt reflect sink usage flags. Override mOutputUsage with sink usage flags. This change is needed to support WFD Secure usecase. Change-Id: I14d8812049f635a8ebe6a944783e0ec7f8f80b1f commit 09da768794c8c6acd786d73239ed5a739695b8cb Author: Raj Kamal <rkamal@codeaurora.org> Date: Mon Jul 20 10:46:27 2015 +0530 display-frameworks: Extend the classes defined in SF Add support for custom classes ExSurfaceFlinger, ExLayer, ExHWComposer and ExVirtualDisplaySurface Change-Id: Iab8c4835faaad9b436bbd34d38702741eb0cf12d Change-Id: Ie400c94ccc77fc379ffa256af03a9e42ba5decaa
* | sf: Change log message in layer query method from ALOGE to ALOGWTatenda Chipeperekwa2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error can be seen for the following use case 1. Connect HDMI display 2. Dump the SurfaceFlinger state The problem here is that HWComposer would have processed the display connection event via the hotplug mechanism and considers that the external display is connected. However, SurfaceFlinger has not updated its internal state (mDisplays) since it will be waiting for the mStateLock to be release by the dump function. As a result, when the dump function invokes the getLayerSortedByZForHwcDisplay for the external display, we will end up seeing the error log message because SurfaceFlingers internal state has not yet been updated. We can move this to ALOGW since it is a non-fatal/recoverable state. CRs-Fixed: 914173 Change-Id: Ib0ba359ecd894dd463417ba57ba1f72c07b5833e
* | SF: Fix invalid reduction of transparent region from a layer.radhakrishna2015-12-161-1/+3
| | | | | | | | | | | | | | | | | | | | Reduce transparent region from a layer only if the transparent region has valid intersection with the layer. Otherwise, reducing a transparent region lying completely outside of the layer leads to invalid sourcecrop values for the layer. Change-Id: Iee9ba53a8072c21c9ba8a6d58cb14ca30f8600ba CRs-Fixed: 620973
* | sf : Fix vertices & texture coordinates computation.Ramakant Singh2015-12-162-8/+55
| | | | | | | | | | | | | | | | | | Compute crop and display frame for GPU composition also in the same way it's done for HWC and compute vertices and texture coordinates for GPU composition. This avoids pixel shifts in output of GPU composition & overlays. Change-Id: I0d31b1e4a81049fff72109d1a210e7cbd945cfe9
* | bug#460672 framebuffer surface can't keep triple buffer if define ↵james.zhang2015-12-081-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 [root cause ] framebuffer surface is in the same process of surface flinger [changes ] call IGraphicBufferProducer::allocateBuffers on producer inside the DisplayDevice constructor to force-allocate all three buffers. [side effects] none [self test ]<tshark, enter and exit mainmenu>: ok [reviewers ] zhongjun.chen [change_type ] AOB --> google_original [tag_product ] common Change-Id: Ideb75d3aa1ed23b2fa4d263a120ea3ca39d01361
* | SurfaceFlinger: Add support for MDP3Baldev Sahu2015-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change is porting of below commits related to MDP3 In MDP3 we are using the widevine level3 for secure content display. And this should applicable only for primary display not for screen shot or screen recording - CRs-Fixed: 595469 - Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc Change-Id: Ie7ac95e1c03eb7ad6f71098ecf09a1e25e69760f
* | Merge branch 'LA.BF64.1.2.2_rb4.7' of ↵Steve Kondik2015-11-165-6/+45
|\ \ | | | | | | | | | | | | | | | git://codeaurora.org/platform/frameworks/native into cm-13.0 Change-Id: Ib29f744a0f7baac5d5ad8a7e9c5c14303b6aeec1
| * | sf: vds: Avoid HWC for certain scenariosManoj Kumar AVM2015-11-023-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reserve HWC for VDS for WFD use case. During WFD usecase, sink usage will contain GRALLOC_USAGE_PRIVATE_WFD flag. When HWC is avoided, all virtual displays are composed using GLES. This means that GLES composes directly into the sink buffer and signals the consumer. Furthermore, it is expected that any color conversion will be handled on the consumer side. CRs-Fixed: 908380 Change-Id: I93ff54c79ece788b6caf3f4172835d8ac1362f62
| * | SurfaceFlinger: Disable rotation animation on Secondary displaysArun Kumar K.R2015-10-262-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support to set animating layer for HWCLayers - After hwc_prepare, dont override the compType of a layer to HWC_FRAMEBUFFER if its for non-primary displays Change-Id: Iac462778ce5fb9016290846146e62f80dcfafd5c CRs-fixed: 922304
* | | sf : Apply user defined panel orientation to blur layerRamakant Singh2015-11-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Blur layer need to capture screen shot to create to blur effect. Hence need to take care any user defined orientation as well. Change-Id: I1c0478810d12661edf2586293bbed342a5b4dc7e
* | | Revert "surfaceflinger: Consolidate display orientation compensation hooks"Steve Kondik2015-11-103-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | * This is completely breaking graphics. This reverts commit f8e2372ad7c6ab5ba0363352607f5ded918add01. Change-Id: I1d694f4228199891a191ce3fb924cec71a6100f0
* | | surfaceflinger: Consolidate display orientation compensation hooksRicardo Cerqueira2015-11-103-11/+15
| | | | | | | | | | | | | | | | | | | | | Dedupe rotation calculation code and make rotation a statically available property in the DisplayDevice Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62
* | | surfaceflinger: odd hw rotation (90/270) patch for swapping width/heightHashcode2015-11-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. Change-Id: I2874fdb8f8d8b855df6d62d338c9a22360491973 NOTE: This patch does not fix the initial startup of bootanimation
* | | SurfaceFlinger: Native changes to add blur effectByunghun Jeon2015-11-0820-23/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native changes to add blur-behind and blur mask effect Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84 SurfaceFlinger: Adding template for LayerBlur files Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6 SurfaceFlinger: Featurize libuiblur module for OSS build Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
* | | Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270Clyde Tan2015-11-071-1/+9
| | | | | | | | | | | | Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531
* | | surfaceflinger: Reimplement hwrotationRicardo Cerqueira2015-11-071-0/+14
| | | | | | | | | | | | Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda