summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Utils
AgeCommit message (Collapse)Author
2025-03-04Move RingBuffer from SF utils into libui Alec Mouri
Stuff in libui or libgui or elsewhere upstack might want to use this. Also remove PowerAdvisor's RingBuffer implementation, since it's basically the same thing. Change-Id: I9d8d94fa0d7b8327b320ceed0d507b83979d033d Bug: 360932099 Flag: EXEMPT refactor Test: builds
2024-07-25SF: fix a few bugs with FrameTargeter storing N fences Ady Abraham
Bug: 267315508 Bug: 354007767 Bug: 308858993 Test: SF unit tests Flag: com.android.graphics.surfaceflinger.flags.allow_n_vsyncs_in_targeter Change-Id: Ib603c0fd29a3e4cb2fcd99dca59bbd5bfb55a787
2024-03-11SF: Extract utils::OnceFuture Dominik Laskowski
Make `mRenderEnginePrimeCacheFuture` thread-safe and release its shared state after the wait. Bug: 328459745 Test: presubmit Change-Id: I2bf3029823109a8c97e599d20c15e46ac1e4aeb9
2024-01-26Correctly pass screenshot fences to transaction callbacks Alec Mouri
In some instances, a screenshot may be captured before a layer has a release callback registered. This can happen when a new buffer has not yet been transacted before a screenshot is captured. This causes the screenshot fence to be dropped and the possibility of tearing when capturing a screenshot while continuously rendering. To resolve this, buffer screenshot fences into a list of future fences when there is no callback registered, and merge those fences when dispatching the release callback. Bug: 302703346 Test: SurfaceViewTests#testMovingWhiteSurfaceView 100 times Change-Id: I91aec3cdb0973092d48cd77e59dd3999e9d9e847
2023-12-27Move VsyncConfiguration from SF to Scheduler Leon Scroggins III
This is part of the long term goal, tracked in b/241285191, of moving scheduling logic/state from SF to Scheduler. It also paves the way for a cleaner version of Ib927935de6ba2b7b8d5037b42eb635ae92019634. Bring RefreshRateStats along to Scheduler, since it is updated along with work that belongs in Scheduler. Mostly this is intended to not change behavior, but there are some exceptions: - the ordering of dumpsys SurfaceFlinger has changed, as some components are now internal to Scheduler, so they are dumped along with it. - two extra calls to update the RefreshRateStats along with updatePhaseConfiguration. The missing calls appear to be an oversight, and it's more natural to include the update in its new location. Move construction of VsyncModulator into Scheduler, since it is constructed from the VsyncConfiguration, now constructed in Scheduler. Add TestableScheduler.cpp, to prevent adding a circular dependency, now that the class's constructor references TestableSurfaceFlinger. Add Dumper::out for simplicity in updating dump calls. Bug: 241285191 Bug: 255601557 Bug: 256196556 Bug: 259132483 Test: libscheduler_test Test: libsurfaceflinger_unittest Change-Id: I01c93cfc3d2342cfbaaf8fe47dc2cd57d0e1fc43
2023-10-27SF: move trunk stable flags to FlagManager Ady Abraham
Test: presubmit Bug: 297389311 Bug: 278199093 Bug: 284845445 Bug: 273702768 Bug: 259132483 Bug: 283055450 Change-Id: I2a85b2534ac8d472acd0de443785317871bbfe89
2023-09-22[SF] Add sysprop to enable vrr config ramindani
Test: manual with adb shell setprop ro.surface_flinger.enable_vrr_config true BUG: 284845445 Change-Id: I36e2e132021e9ac17e1d928e754c6df54bdc29d3
2023-08-17Add dump of hdr event history John Reck
Track & dump the HDRLayerInfo callback history to aid debugging when HDR brightness changes aren't happening Bug: 234181960 Test: adb shell dumpsys surfaceflinger --hdrinfo Change-Id: Ia8376517877d4c7844af6be4d488299554c164f5
2023-07-14Add new SF backdoor option: hdr/sdr ratio overlay Sally Qi
- follow how RefreshRateOverlay did in general. - 1043 as new opcode to enable hdr/sdr ratio overlay. - decouple SevenSegmentDrawer and SurfaceControlHandle helper classes from RefreshRateOverlay. - add corresponding SF backdoor test for validation. - for non-HDR-supported device, we don't reject them to use SF backdoor but 1.00 will be always shown on the screen if enabling. Test: adb shell call service call SurfaceFlinger 1043 1; atest SurfaceFlinger_test Bug: 277957056 Change-Id: Ifce2d435f127b53ab9d01aba4e24ffd4fdb010a7
2022-11-04SF: Clean up dumpsys for Scheduler Dominik Laskowski
Split dump into three flags corresponding to Scheduler, EventThread, and VsyncReactor. Expand utils::Dumper to automate more types. Bug: 241285191 Test: dumpsys SurfaceFlinger --scheduler Test: dumpsys SurfaceFlinger --events Test: dumpsys SurfaceFlinger --vsync Change-Id: I17b3b772cd164305e2fe0239638b1a08236c12a2
2022-11-04SF: Clean up dumpsys for displays Dominik Laskowski
Remove DisplayDevice::getDebugName. Add Dumper::Section to automate indented sections with a heading. Bug: 241285876 Test: dumpsys SurfaceFlinger --displays Change-Id: I21a8e98bf26163e374810f0afbe649e694e5dda6
2022-09-29SF: Add utility class for dumpsys formatting Dominik Laskowski
The Dumper class automates stringifying (a minimal set of types for now) and indenting. Bug: 241285876 Test: dumpsys SurfaceFlinger --displays Change-Id: I5581cd9cb4235e2c710e303b6ab634847554cc30