summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/common
AgeCommit message (Collapse)Author
2025-03-24Merge "Add border API to surface control" into main Cairn Overturf
2025-03-21Detect secure layers and start lazy HDCP activation Huihong Luo
Layer snapshots are traversed to check for secure layers, then trigger HWC to start HDCP activation when a secure layer is detected. Flag: com.android.graphics.surfaceflinger.flags.hdcp_negotiation Bug: 372902990 Bug: 375340594 Test: manual Change-Id: Ie52159043f94d7cdb079d7c48c47764017a979f5
2025-03-19Add border API to surface control YCairn Overturf
See go/sf-box-shadows-api for more details Bug: b/367464660 Flag: com.android.window.flags.enable_border_settings Test: atest SurfaceFlinger_test Change-Id: I1190edb97693004d9f46058fd0165451470a65b3
2025-03-13Introduce a dependency monitor for fences Alec Mouri
This allows for userspace logging for a buffer and read/write dependencies on the buffer. Hook up SF to the dependency monitor. Right now this _does_ emit logs in SF when the primary display is powered down, which is likely indicative of SF being sloppy about release fences in situations where tearing won't be noticeable, but I did verify that manually making screenshotting forget to merge GPU work into a layer's release fence, which has been one way SF's torn the screen, triggers logcat, which is ultimately what we want. Bug: 360932099 Flag: com.android.graphics.surfaceflinger.flags.monitor_buffer_fences Test: manually remove screenshot fence handling and check logs Change-Id: Ica391dfa8a4f2924bb72664b9d9399e4ad9e1747
2025-03-13SF: Remove multithreaded_present flag Dominik Laskowski
Change (and rename) CompositionEnginePresentTest.worksAsExpected to avoid an assumption that would now break the test. Bug: 380251940 Flag: EXEMPT removing multithreaded_present Test: presubmit Change-Id: Ifbcbfc7d82e64d909a6e4d310f34bcb6578d1e1f
2025-03-07Merge "Handle virtual display power state in SurfaceFlinger" into main Vladimir Komsiyski
2025-03-07Handle virtual display power state in SurfaceFlinger Vladimir Komsiyski
If the state changes while there's no surface, the new power state is lost. Even though there's no DisplayDevice, there's a proper DisplayDeviceState for that virtual display. Storing the power state there and respecting it when creating the display will work. This is tied to android::companion::virtualdevice::flags::correct_virtual_display_power_state since that flag controls whether or not to set the power mode of the SurfaceControl for the virtual display (which ultimately feeds into SurfaceFlinger::setPowerMode). With this change, virtual displays whose PowerMode is OFF will no longer be composited since the correct power mode is now set in SurfaceFlinger (instead of assuming all virtual displays are ON). Bug: 342681202 Flag: android.companion.virtualdevice.flags.correct_virtual_display_power_state Test: manually tested with flag on/off with Android Auto Projected Change-Id: Ib10514da05e277a8ed574c92ff71d2a4d52975b2
2025-03-05Merge changes I6f68b884,I870d8f13 into main Treehugger Robot
* changes: SF: Clean up helpers for thread priority SF: Remove connected_display flag
2025-02-27SF: Remove connected_display flag Dominik Laskowski
Bug: 380251940 Flag: EXEMPT removing connected_display Test: presubmit Change-Id: I870d8f13fe8012f07a47dace756c5d4b2261ebd3
2025-02-21Merge "[SF] Flag to use idlePeriod for VSync outlier calculation" into main Ram Indani
2025-02-19[SF] Flag to use idlePeriod for VSync outlier calculation ramindani
Test: None BUG: 346503493 BUG: 385059265 Flag: com.android.graphics.surfaceflinger.flags.vsync_predictor_recovery Change-Id: Ibf0b0afadff480b02ed1f3e897e4789f3937385d
2025-02-12Merge "SF: Let DM resize framebuffer on resolution change" into main Dominik Laskowski
2025-02-10SF: Let DM resize framebuffer on resolution change Dominik Laskowski
The goal of this change is to synchronize resolution switching across SF and DM. The lack of synchronization causes glitches, which are currently papered over in HWC by dropping frames whose size don't match the active resolution. A mode set involving a resolution switch was finalized by destroying the DisplayDevice and thus its HWC layers. Remove this special case in favor of letting DM call SurfaceControl.setDisplaySize right after requesting the mode set via setDesiredDisplayModeSpecs. Emit a mode change event to DM as soon as the DisplayModeRequest becomes the desired mode. In response, DM sends the transaction that resizes the display via setDisplaySize, so wait until that commit before modesetting to the new resolution, and resize the framebuffer in that same frame. Display projection depends on display size, so update the latter first when committing DisplayDeviceState. Fixes: 355427258 Flag: com.android.graphics.surfaceflinger.flags.synced_resolution_switch Test: Internal (caiman) and external displays, with different rotations. Test: Inner display (comet) with install orientation. Change-Id: Ifaf300f3b5f907f7cd10b8db2aa6165ad2106530
2025-02-05Demarcate cached sets in composition summary Cairn Overturf
Previously, the composition summary indicated that HWC was compositing more layers than it actually was. Example when youtube video open and playing in a free form window Before: bbrrrRrbbb After: [b:brr]r[R:rbbb] So there are 2 cached sets and 1 uncached set. One cached set and one uncached layer is composited by HWC, the other cached set is composed by the GPU. Bug: 391428079 Flag: EXEMPT log only update Test: Capture perfetto trace and confirm layers are skipped and overridden as expected Change-Id: I4ffda43f5248ef8bb690cdaca0eeca7ffac3d997
2025-01-27Merge changes I6c8dfb52,Iff26902c into main Ram Indani
* changes: [SF] increase jank threshold to 4 milliseconds Flag to increase jank threshold to 4 milliseconds
2025-01-24Flag to increase jank threshold to 4 milliseconds ramindani
Test: No test BUG: 342265411 Flag: com.android.graphics.surfaceflinger.flags.increase_missed_frame_jank_threshold Change-Id: Iff26902c9c0ca16b3ef82961c0279b88e101364e
2025-01-17Add debug sysprops to disable sched fifo in surfaceflinger Vishnu Nair
debug.sf.disable_sched_fifo_sf: false debug.sf.disable_sched_fifo_sf_binder: false debug.sf.disable_sched_fifo_sf_sched: false debug.sf.disable_sched_fifo_re: false debug.sf.disable_sched_fifo_composer: false debug.sf.disable_sched_fifo_composer_callback: false Fixes: 390673988 Test: setprop disable_sched_fifo_sf and check sched policy in perfetto Flag: EXEMPT adding sysprop flags Change-Id: I1973a96591bacd8d7fc6e103f24f4b8e9c7ab926
2025-01-08Trace critical workloads Vishnu Nair
Create a new trace track and trace all important work that happens on the main thread. Keep track of changes in workload as transaction are queued and committed to infer when the CPU load will increase from the last frame. This CL only logs the workload. Flag: EXEMPT logs Bug: 333623207 Test: perfetto Change-Id: Ib423d1968545adc89172bd0e40fbde2a31b46ddf
2024-12-12Alphabetize SF flags Melody Hsu
Reduces merge conflicts Bug: b/383769554 Test: presubmit Flag: EXEMPT, flag reordering Change-Id: Ia293649ff2786a1638e56e832ce8ea1387cbd74a
2024-12-09Reject duplicate layer stacks in SF Melody Hsu
Different displays could try to assign the same layer stack ID, causing potential race conditions when releasing fences. Fixes: b/370358572 Test: atest SurfaceFlinger_test, atest MultiDisplayTest Flag: com.android.graphics.surfaceflinger.flags.reject_dupe_layerstacks Change-Id: I2e59daa184d888a1804d8250ba6ce5037542a7d1
2024-12-06Add a trunk stable flag for switching blur algorithm to Kawase2. Shan Huang
Bug: 353826438 Test: m -j Flag: com.android.graphics.surfaceflinger.flags.window_blur_kawase2 Change-Id: Ifd25ea69409af9ca2a6bb9d541c714f0516abf15
2024-12-03SurfaceFlinger: Import hardware flags from aconfig Sally Qi
For Luts follow-up implementation. Bug: n/a Change-Id: If7f18fcbf76e46694f79f9b5056ff149a0d387f0 Test: builds Flag: EXEMPT FlagManager change
2024-12-02Merge "SF,HDR: Add HDR output type to modes" into main Sasha McIntosh
2024-11-30Add flag arr_setframerate_gte_enum Rachel Lee
For GTE enum in public setFrameRate apis. Bug: 380949716 Flag: com.android.graphics.surfaceflinger.flags.arr_setframerate_gte_enum Test: presubmit Change-Id: I59a98876a97b8d42177a5eea8d5916c5871c9825
2024-11-27SF,HDR: Add HDR output type to modes Sasha McIntosh
Add hdr output types to display configuration and display mode. This will be used by HWC to infer the minimum bits per color required for the link. If we do not specify the minimum bit depth for HDR displays, we may run into bandwidth contention, resulting in a low quality visual experience. Bug: 374183675 Test: HWComposerTest#getModesWithDisplayConfigurations* Flag: com.android.graphics.surfaceflinger.flags.connected_display_hdr Change-Id: I2d680d257ed9fbd7aad00282363a2e784da4cce5 Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
2024-11-21Add r/w opt-in rollout flag for RenderEngine on Graphite Noelle Scobie
This flag will allow some devices to opt in to RE-Graphite as a preview rollout progresses. Making it a R/W flag will allow for A/B comparison. Test: manual validation of aconfig flag / sysprop combos Bug: b/293371537 Flag: com.android.graphics.surfaceflinger.flags.graphite_renderengine_preview_rollout Change-Id: I30a59986d1da2dc8355c2b3cf2da436c6cc64120
2024-11-21Allow read/write aconfig flags to be read before boot complete Noelle Scobie
We should now be able to access R/W aconfig flags immediately during boot, thanks to a new storage mechanism. See bug for details and links. Bug: b/380147997 Test: manual testing of new R/W flag and validation of dumped flags Flag: EXEMPT N/A Change-Id: Idc77e2d767c6839b11776372f101af75e4410d61
2024-11-19Add flag for native session manager Matt Buckley
Adds a flag for the upcoming "SessionManager" in PowerAdvisor, which holds the logic for the Timeline API and HAL communication. This flag guards the creation of SessionManager, and by extension all of the associated Timeline API logic. Bug: 367803904 Change-Id: I76200fa5bf4f3f519ec20a8172e45b7848ab124c Flag: com.android.graphics.surfaceflinger.flags.adpf_native_session_manager Test: presub
2024-11-18Limit HLG to 4.926x SDR Alec Mouri
HLG is universally too bright on basically every single platform that supports HDR. Fix this for Android. Bug: 362510107 Flag: com.android.graphics.surfaceflinger.flags.begone_bright_hlg Test: HLG playback Change-Id: I5d464c016be62b11f6a3cc1ab228e14d198afb15
2024-11-18SF: cleaning up hotplug2 flag Lucas Berthou
This flag has reached nextfood a long time ago and is therefore no longer needed. Bug: 374185760 Flag: EXEMPT flag removal Test: manual Change-Id: I6d21b4381bbadcfb4661cdbc9b665727fa2d3c90
2024-11-16Flag: Add a trunk-stable flag to guard EDID-based Display IDs Gil Dekel
Add a trunk-stable flag to guard the use of EDID-based display IDs. See: go/edid-display-ids-al13 Flag: com.android.graphics.surfaceflinger.flags.stable_edid_ids Bug: 352320847 Test: None. Change-Id: Ifc59d031faeb19aedf5eccc68a1c9a5d0f538122
2024-11-15Skip invisible windows in input list Wenhui Yang
To reduce traffic sent over binder and the number of copied objects in native code, we decide to remove windows from WindowInfosListener that are not visible because input doesn't need to know about the windows that aren't visible, and invisible windows don't affect the operation of other windows. Fixes: 305254099 Test: adb shell su root dumpsys SurfaceFlinger Test: atest LayerSnapshotTest Flag: EXEMPT bugfix Change-Id: I1ccc29565ee92277a703d16c07fd1141d6df6862
2024-11-07Merge changes from topic "android-display-processing-1" into main Brian Lindahl
* changes: Add plumbing to pass picture profiles down to Composer HAL Move picture profile flag from surfaceflinger to libgui
2024-11-07Merge changes from topic "replace_frametracker" into main Treehugger Robot
* changes: SF: Implement FrameStats directly in FrameTimeline SF: Add flag for FrameTracker removal
2024-11-06Move picture profile flag from surfaceflinger to libgui Brian Lindahl
Bug: 337330263 Test: build Flag: com.android.graphics.libgui.flags.apply_picture_profiles Change-Id: I2c1aeba638ed9afc1a7059718d8e20ce86c5db61
2024-11-05SF: Add flag for FrameTracker removal Ben Widawsky
Bug: 241394120 Test: builds Flag: com.android.graphics.surfaceflinger.flags.deprecate_frame_tracker Change-Id: Ib7fdfc31f92d292fdceb6027d22c9ed7fbeadb3e
2024-11-04Add flag for applying picture profiles in SurfaceFlinger Brian Lindahl
Bug: 337330263 Test: build Flag: com.android.graphics.surfaceflinger.flags.apply_picture_profiles_sf Change-Id: Ic6d08f00098e79547148626598ede00b1887df95
2024-11-01Merge changes Iec9cde3b,I63916801 into main Ady Abraham
* changes: SF: omit vsync callbacks when screen is OFF SF: add a new flag for omiting vsync on screen is OFF
2024-10-31SF: add a new flag for omiting vsync on screen is OFF Ady Abraham
Test: N/A Bug: 331636736 Flag: com.android.graphics.surfaceflinger.flags.no_vsyncs_on_screen_off Change-Id: I63916801f39bf45d8f058d36095452d39585c226
2024-10-31Merge "SF,HDR: Add readonly flag for connected display HDR feature" into main Sasha McIntosh
2024-10-29Remove flag single_hop_screenshots Melody Hsu
Flag has been rolled out for several months and is safe to remove along with any legacy methods and dead code. Bug: b/351894825 Test: atest SurfaceFlinger_test Flag: EXEMPT flag removal Change-Id: Id6fdfc534a0bff6ff9dfb8727c08ff821bc4965a
2024-10-28SF,HDR: Add readonly flag for connected display HDR feature Sasha McIntosh
Bug: 374182788 Bug: 374187407 Test: adb shell dumpsys SurfaceFlinger | grep connected_display_hdr Flag: com.android.graphics.surfaceflinger.flags.connected_display_hdr Change-Id: I29ba7ecb289f55e6d2be2b74f82bf012d3530ec5 Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
2024-10-24Merge "SF: Add a readonly feature flag for display config error HAL changes" ↵ Treehugger Robot
into main
2024-10-24SF: Add a readonly feature flag for display config error HAL changes Manasi Navare
Bug: 374184110 Test: adb shell dumpsys SurfaceFlinger | grep display_config_error_hal -- Verify that the flag shows up Flag: com.android.graphics.surfaceflinger.flags.display_config_error_hal Change-Id: I78af63115914c8ae53dbb04f6d86f601e502ec8f Signed-off-by: Manasi Navare <navaremanasi@google.com>
2024-10-23Merge "Add additional flag for FMQ SF" into main Matt Buckley
2024-10-22Add additional flag for FMQ SF Matt Buckley
This flag helps decouple the SF FMQ rollout from the rest of the FMQ rollout Bug: 284324521 Bug: 315894228 Flag: com.android.graphics.surfaceflinger.flags.adpf_fmq_sf Flag: android.os.adpf_use_fmq_channel_fixed Test: atest PowerAdvisorTest Change-Id: I101fb3861fb7c03c5d070c065acf1069bf90ccc6
2024-10-17Remove release fence flags Melody Hsu
ce_fence_promise and screenshot_fence_preservation flags have been out for several releases. They can be deleted, along with any obsolete code related to the flag removal. Bug: 351894825 Test: atest SurfaceFlinger_test Flag: EXEMPT flag removal Change-Id: Iba6166358c96ff6cfe5c64b68640fcd992c4089f
2024-09-13SF: Do not trace FrameTimeline before start Ady Abraham
Filter FrameTimeline events for frames started before the trace started. Bug: 364194637 Test: manual Flag: com.android.graphics.surfaceflinger.flags.filter_frames_before_trace_starts Change-Id: I9185f384f306eddab1afc2ea9d7901dd70d2f1a2
2024-09-12SF: parsing Detailed Timing Descriptor in the framework Lucas Berthou
The first DTD in an edid is the preferred timing which allows to get a more precise and more often correct physical size for a display. This can be used to estimate or correct the dpi in case the edid reports the wrong size and hwc is not providing the right value. See edid spec: https://glenwing.github.io/docs/VESA-EEDID-A2.pdf Flag: com.android.graphics.surfaceflinger.flags.correct_dpi_with_display_size Bug: 361413340 Test: DisplayIdentification_test Test: HWComposerTest Test: manual - see bug and doc Change-Id: I0bb85dcf8039f923f1ac892c4a1d6bda771dbf4f
2024-09-09Merge "Remove flag view_set_requested_frame_rate_mrr" into main Rachel Lee