summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
AgeCommit message (Collapse)Author
2025-03-18Merge "Add support for Vulkan VK_EXT_frame_boundary in HWUI." into main Greg Daniel
2025-03-18Add support for Vulkan VK_EXT_frame_boundary in HWUI. Greg Daniel
Test: manual compiling Bug: b/367717718 Flag: EXEMPT debug only Change-Id: Ia76df1bff98c438d2bf7fee91e28da55ce775b54
2025-03-17Merge "Fix vkGetPhysicalDeviceQueueFamilyProperties2 validation error" into main Treehugger Robot
2025-03-17Merge "Revert "Make ReliableSurface's fallback buffer match ANW size"" into ↵ Priyanka Advani (xWF)
main am: 1521bc5d1c am: e819223b0e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3547402 Change-Id: Ia49731d080f09a1d8dfdd3538205daae24f32714 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-17Merge "Revert "Make ReliableSurface's fallback buffer match ANW size"" into main Priyanka Advani (xWF)
2025-03-17Fix vkGetPhysicalDeviceQueueFamilyProperties2 validation error dm93.han
- VUID-VkQueueFamilyProperties2-sType-sType sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 Bug: 399240969 Flag: EXEMPT trivial validation fix Signed-off-by: dm93.han <dm93.han@samsung.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:4ed416c12a73d6530e76e32b0e591e5fe0d86f90) Merged-In: Iddb2e703ec2d792ff9717a2b9e9d2a61f15e55ec Change-Id: Iddb2e703ec2d792ff9717a2b9e9d2a61f15e55ec
2025-03-16Revert "Make ReliableSurface's fallback buffer match ANW size" Naresh Kumar Podishetty (xWF)
This reverts commit 77477858a7e5fd025680b7534af70637e9e0328e. Reason for revert: <Droid monitor: Likely culprit for b/403616834 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.> Change-Id: I495eae72dc0054bc6fff664c504e1305c269ce3f
2025-03-14Merge "Make ReliableSurface's fallback buffer match ANW size" into main am: ↵ Jason Macnak
71dfab310f am: 8489f89cdc Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3511350 Change-Id: Idbbf1378e7244fb3cdcae277bb028eddb7dbf68d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-14Merge "Make ReliableSurface's fallback buffer match ANW size" into main Jason Macnak
2025-03-13Call libgui's SurfaceControl directly in hwui Alec Mouri
HWUI is no longer pursuing becoming a mainline module, so this is not needed. Moreover, dlopening ASurfaceControl symbols hits an internal lock, which makes this code susceptible to lock contention during app startup. Bug: 374342597 Flag: EXEMPT refactor Test: builds, boots Test: gmail Change-Id: I56ac9220dc669b8ca7c83a07268b910576aa96e5
2025-03-10Make ReliableSurface's fallback buffer match ANW size Jason Macnak
Bug: b/397754921 Test: cts -m CtsUiRenderingTestCases Change-Id: Ie5faee78a051bd7b18bbcf62b0d9334964066465
2025-03-04Don't create layers for negative-sized RenderNodes John Reck
Fixes: 257954570 Test: n/a Flag: EXEMPT trivial bug fix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1895e2e9de073860cca89c9f94c0af548d6eb6aa) Merged-In: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7 Change-Id: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7
2025-02-27Merge 25Q1 (ab/12770256) to aosp-main-future Xin Li
Bug: 385190204 Merged-In: Ibc80f09d54bec2c83814874d94a8f8eb22b5075f Change-Id: If7779ae57fd91631d08bd8af5434c2ddd963aad7
2025-02-21Merge "Fix full draw power usage increase issue" into main am: d25752e53d ↵ Treehugger Robot
am: 14124ea1f4 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3500473 Change-Id: Ibafcc6691130dfb83c8d01d34662f9d1794a8176 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-19Fix full draw power usage increase issue Jiang Tian
Full draw will be happened on HWUI under 144Hz device,there are more draw commands under renderFrameImpl than in the 120Hz fps device, frame.bufferAge() > (int)mSwapHistory.size() resulting in an increase in power usage. So need to increase (int)mSwapHistory.size() to 8. Bug: 397592669 Test: Manual 1.Use the 144Hz device 2.Grab Settings Systrace of the sliding scene 3.Collect the Systrace, and check the drawing dirty area is the screen area of the entire device Change-Id: I477d37828f080e64cded9f285c58b7b27cbe6b03
2025-02-18Merge "Add infrastructure for registering a native frame metrics observer" ↵ Treehugger Robot
into main
2025-02-18Merge "Unified format and Clearly traced opening recents" into main am: ↵ Treehugger Robot
cb4d99b845 am: b86e2c76c3 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3484711 Change-Id: I7372ca6d4d7c60b992b4fe67ee01deb1e0b75c61 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18Add infrastructure for registering a native frame metrics observer Siarhei Vishniakou
This will allow NativeInputEventReceiver to subscribe to the frame metrics notifications directly from the native code, without having to involve java. Java would still be needed to register the observer, though. Bug: 376713684 Test: compile only, this infra is used in another CL Flag: EXEMPT refactor Change-Id: I7be8f0b2e94595f9a64ce69a22fe5910e0cd7711
2025-02-11Calculate workload target using original frame deadline Melody Hsu
The target work duration in HWUI ADPF is sometimes incorrect, and is more often incorrect during buffer stuffing recovery due to the exposure of new jank. The issue causes CPU clock frequencies to decrease too much, and cause potential jank in subequent frames. The original frame deadline should be used instead in calculating the workload target deadline when triple buffered because even when the deadline is pushed later during buffer stuffing, the throughput requirements remain the same. Also fixes a misordering in FrameInfoNames that was inconsistent with FrameInfo and FrameMetrics. Bug: b/389939827 Test: atest JankTracker Test: presubmit, perfetto traces w/ and w/o buffer stuffing recovery Flag: com.android.graphics.hwui.flags.calc_workload_orig_deadline Change-Id: I2e3da6ee927d20fcbc9299ab5eda5732660d7246
2025-02-07Unified format and Clearly traced opening recents Shuangxi Xiang
Compared with the submission in Commit: fbeac3c,it is recommended to unify the trace information in the copyLayerInto function and the copyHWBitmapInto function in RenderProxy to make the output information clearer and easier to understand. Test: traced opening recents Signed-off-by: Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> Change-Id: If759ccebb6beae21e2c026112c202814fe5e336f
2025-01-14Only preload egl context “Shadman
- The buffer allocator initialization is removed from this flag as it is caused a memory regression b/384876428 on activities without ui. - This change allows us to claw back some of the improvement and we can follow up with further optimizations afterwards impact: improves app launch latency in low core devices - ~20ms in our view baed app launch - up to ~60ms improvements in material3 compose app - net neutral memory change Test: build and app launch test Bug: 383612849 Flag: com.android.graphics.hwui.flags.early_preload_gl_context Change-Id: I3009dcf7f9ec86e908cd65239974be208ad6b918
2025-01-09Merge "Modify the log information of semaphore in finishFrame" into main am: ↵ Treehugger Robot
e4603f096e am: 960adc8ea0 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3444280 Change-Id: I13e6dcd1c2011419ccd41487e98b60631be72cfd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-09Modify the log information of semaphore in finishFrame Shuangxi Xiang
With the version change, the log information about the creation and acquisition failure of semaphore in the VulkanManager::finishFrame function is not updated. It is recommended to modify the log content to make the output log clearer. Signed-off-by: Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> Change-Id: I1cb5a73765d4f780dc004a68337a1bfbdf2565e8
2025-01-08Merge "Adds missing standard include <memory> for std::shared_ptr<>." into ↵ Treehugger Robot
main am: 8ae06af222 am: 73c589bc96 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3440745 Change-Id: I8d94f4a93254a1c71c3f946569a26dfbe2a8df86 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-08Adds missing standard include <memory> for std::shared_ptr<>. Yi Kong
Fixes build breakage from upstream LLVM change: https://github.com/llvm/llvm-project/commit/ffc7380ff4808fcc21350a39caf7f34073b41697 frameworks/base/libs/hwui/renderthread/HintSessionWrapper.h:101:41: error: implicit instantiation of undefined template 'std::shared_ptr<android::uirenderer::renderthread::HintSessionWrapper::HintSessionBinding>' 101 | std::shared_ptr<HintSessionBinding> mBinding; | ^ prebuilts/clang/host/linux-x86/clang-dev/include/c++/v1/__fwd/memory.h:24:28: note: template is declared here 24 | class _LIBCPP_TEMPLATE_VIS shared_ptr; | ^ Test: presubmit Change-Id: Icc0f366c6f1e57aa9ede9fe4868f0a66dff2db94
2024-12-13render thread early preload optimizations “Shadman
1. preload eglContext when renderthread preload is called so setSurface work is not waiting for this work during app launch crit path. 2. Additionally queue GraphicBufferAllocator instance get, so allocateBuffer does not wait for initialization during app launch critical path. Impact: Large improvement in app launch latency for low core devices - ~70ms of improvement in our view based app launch - ~27ms of improvement in material3 compose base app launch Test: manual built and flashed Bug: 383612849 Flag: early_preload_gl_context Change-Id: I580e31de1d3a9878cf102dfdcad39bfd64bf2c53
2024-11-18Don't create layers for negative-sized RenderNodes John Reck
Fixes: 257954570 Test: n/a Flag: EXEMPT trivial bug fix Change-Id: I82a00ec21b58ea55779d02db4a54d1ef2d37dcc7
2024-09-19[Vulkan] Query global priority support for queue creation Juston Li
Setting up a device queue with a global queue priority above the system default requires sufficient privileges (SYS_NICE) otherwise queue creation will fail. SurfaceFlinger and system_server have SYS_NICE and will set priority to REALTIME. SysUI and Launcher take that as an indication they should request HIGH for better preemption strategy. However for upstream DRM drivers, we currently lack a way to grant them granular access to HIGH but not RT. For long term, the right way to do this is via drm specific cgroup for scheduling controls however this is currently being worked on upstream. In the meantime, instead of fatally crashing, we can query the global priorities supported before queue creation and if its not supported, drop the priority request and log a warning. Note this requires vkGetPhysicalDeviceQueueFamilyProperties2 which is provided by Vulkan 1.1 while the global priority query can be safely added to the pNext chain and will be ignored if VK_EXT_global_priority_query isn't supported. Bug: 343986434 Flag: com.android.graphics.hwui.flags.query_global_priority Test: UI comes up debug.renderengine.backend=skiavkthreaded Change-Id: I662c9ce3f3724e87690e25d260ee010340451c53
2024-09-09Merge "Add a trace to link inputEventId and vsyncId" into main Kyle Holm
2024-09-06Add a trace to link inputEventId and vsyncId Kyle Holm
We should have an easy way to query in a perfetto trace for the frame associated with an input event. This change adds a trace event to do that. Bug: 363076084 Test: https://ui.perfetto.dev/#!/?s=039fa15daa0e4cd005587a64962b5a48f7910cec Verified the new slice has the correct vsyncId and inputEventId. Flag: EXEMPT log only update Change-Id: I2d4e5e439076c94b195cbe328b66d0c988e10661
2024-09-06Merge "Add support for AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM" into main Treehugger Robot
2024-09-06Add support for AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM Greg Daniel
Bug: 283989374 Test: local compiling Flag: EXEMPT bugfix Change-Id: I6486a664a74959a7c5e0fde4c80df9e318d9d4b1
2024-08-30[HWUI] Update Ganesh includes to specify new location Nolan Scobie
Upstream Skia changes I7269acfae5c26518c2a61930a8af9584682751cd and Ibc927d0ae66a05546957300090a651614e720fad are moving Ganesh headers into Skia's include/gpu/ganesh/ directory. Android's current includes are relying on temporary shims which will soon be removed. Note: I also sorted some includes to try and calm the chaos a tiny bit, but didn't go out of my way to update all non-Ganesh Skia includes. clang-format decided to further re-arrange things, so I'm hoping this doesn't make future merge conflicts too painful. Bug: 40044159 Test: builds after locally deleting Skia's temporary shims Flag: EXEMPT refactor Change-Id: I5099e215a58915a5e6c7b3434f9855006dda8c60
2024-08-22Enlarge mLast4FrameMetricsInfos from 4 to 6 entries Tang Lee
As a result of tuning SurfaceFlinger durations (debug.sf.late.sf.duration etc.), the ring buffer of the frame metrics infos is sometimes too small, and already popped the frame's info when its GPU complete is triggered and doing onSurfaceStatsAvailable(), so finishFrame() is not called for this frame, which causes incorrect jank judgement on the next frame. Increase the ring buffer size from 4 to 6 can avoid the issue. Bug: 354618175 Test: no skipped frame in onSurfaceStatsAvailable Flag: EXEMPT bugfix Change-Id: I2865365213e16cfebe63b949aae332cea32d8927
2024-08-09Skip eglCreateContext telemetry for HWUI contexts Tom Murphy
We want eglCreateContext telemetry to give us insights into how developers use EGL. Including HWUI telemetry in this pollutes this telemetry. Skip recording of the creation of this context using the new Egl extension. Currently this only disables the passing of GpuStatsInfo::Stats::CREATED_GLES_CONTEXT to the gpu stats. Test: Checked the code path executed correctly with the flag enabled/disabled using logging Bug: 347911216 Flag: com.android.graphics.hwui.flags.skip_eglmanager_telemetry Change-Id: Ifcadd5af263f26388026bcd70ec8dc9c2914cd0a
2024-06-20[base] Update deprecated GrVk type names Kaylee Lubick
These are just aliases for the GPU-backend agnostic type name, so we should just use them. This also removes seemingly unnecessary #includes. Change-Id: I98ffd20f91d7526bc4f3d405f8a9b71e612021b9 Bug: b/309785258 Flag: EXEMPT refactor
2024-04-26Merge "Don't call set_buffer_count for single buffer surfaces" into main Treehugger Robot
2024-04-26Don't call set_buffer_count for single buffer surfaces John Reck
Fixes: 296145618 Test: atest android.graphics.cts.HardwareRendererTest#lockHardwareCanvasSingleBuffer Change-Id: I1513d6f484e44cb27a7683594899f99e0d802c2b
2024-04-23Merge "Add HWUI session tagging" into main Matt Buckley
2024-04-20Add HWUI session tagging Matt Buckley
Adds a hidden method for the creation of special "internal" hint sessions with extra metadata, and plumbs hwui to use it Bug: 330553312 Test: atest PerformanceHintNativeTestCases Test: hwui unit tests Change-Id: I35e7f81623b8f81a9a12e485f221952a13035b02
2024-04-18Fix HardwareRenderers becoming invalidated by TRIM John Reck
Fixes: 335646931 Test: repro steps in bug Change-Id: I6b22d202b71effa1a7136a20f51b38732d0fde74
2024-04-10Do not mix pid_t and int32_t in Hwui Jerome Gaillard
Those two types are both equivalent to int for Android, but they may not be the same in all host build platforms. Bug: 322360037 Test: build libhwui on Android and host Change-Id: I356da56ce507af1cfa00b685c71d445870338cda
2024-04-10Add RenderProxy to host builds of hwui Jerome Gaillard
This makes RenderProxy and DrawFrameTask compile on host. Bug: 322360037 Test: build libhwui on host Change-Id: I509519e6838ed250c1a1a68390e5e16769427f63
2024-04-10Use CPU rendering for host builds Jerome Gaillard
This bypasses the computation of PipelineRenderType on host to force using the CPU rendering pipeline. Bug: 322360037 Test: build libhwui on host Change-Id: Icb5178ba04e5348868c6c7f637e0c7a341fc84cd
2024-04-08Only pick fp16 egl config when using color mode hdr. Alec Mouri
Devices that support fp16 should only choose an fp16 egl config when color mode HDR is requested. Otherwise this causes the underlying EGLSurface to be configured with fp16 buffers, which breaks some odd API paths that apps use, like HardwareRenderer -> ImageReader. Bug: 332834976 Test: Youtube music on watch devices. Change-Id: I5db837342eeeb69ed08d1f86d98c4945497fffde
2024-04-03Create a new RenderPipeline for CPU only rendering Jerome Gaillard
This takes out of SkiaPipeline what relies on GPU, and puts it into SkiaGpuPipeline, making SkiaOpenGLPipeline and SkiaVulkanPipeline inherit from SkiaGpuPipeline. From the new restricted SkiaPipeline, this creates SkiaCpuPipeline that only relies on CPU for rendering. In addition, this moves references to the GrContext out of IRenderPipeline and into SkGpuPipeline as the only usage is in classes inheriting from SkGpuPipeline. Bug: 322360037 Test: build libhwui on host Change-Id: Ifadacfc593ff54377d6a8a65b0505e294c8d1b29
2024-03-27Pass active functor rendering threads to HWUI ADPF session Igor Kraskevich
Test: unit tested Bug: 329219352 Change-Id: I13e83030e5d0891584ba9d62fe6cc1eb332a7b74
2024-03-25Revert "Create a new RenderPipeline for CPU only rendering" John Reck
This reverts commit 09a38e4e8c64ccf62573da7ffbe40cef90e573ae. Reason for revert: b/331231487 Change-Id: If9529d7ba39edef707af50f67ca8cd4754bfe11b
2024-03-21Create a new RenderPipeline for CPU only rendering Jerome Gaillard
This takes out of SkiaPipeline what relies on GPU, and puts it into SkiaGpuPipeline, making SkiaOpenGLPipeline and SkiaVulkanPipeline inherit from SkiaGpuPipeline. From the new restricted SkiaPipeline, this creates SkiaCpuPipeline that only relies on CPU for rendering. In addition, this moves references to the GrContext out of IRenderPipeline and into SkGpuPipeline as the only usage is in classes inheriting from SkGpuPipeline. Bug: 322360037 Test: build libhwui on host Change-Id: Iee70e49a3bdd5f6e85ced91c1a62a9a357eba4ce
2024-03-09Merge "Check optional before accessing the data." into main Sally Qi