summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiang Tian <ot_jiang.tian@mediatek.com> 2025-02-19 14:52:48 +0800
committer chuanghua zhao <chuanghua.zhao@mediatek.com> 2025-02-19 05:08:03 -0800
commit32446b8a119ab4c172685f026f66b16105d3296c (patch)
tree0c50af1e8e96c1b0767ce4bfea2a087941ee9a94
parent55b9f102572ca3bcea773cd8395fe3ce64c4b5c1 (diff)
Fix full draw power usage increase issue
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
-rw-r--r--libs/hwui/renderthread/CanvasContext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index cb3753822035..c31d0be74cb6 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -312,7 +312,7 @@ private:
};
// Need at least 4 because we do quad buffer. Add a few more for good measure.
- RingBuffer<SwapHistory, 7> mSwapHistory;
+ RingBuffer<SwapHistory, 8> mSwapHistory;
// Frame numbers start at 1, 0 means uninitialized
uint64_t mFrameNumber = 0;
int64_t mDamageId = 0;