Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15617201 authored by Pengfei Zhao's avatar Pengfei Zhao Committed by Robin Lee
Browse files

Fix missing call to requestTransparentRegion()



Partial revert of a59c3a5a

Add a call back to requestTransparentRegion() in performDrawFinished()
to fix a bug where the transparent region is not set correctly for the
Activity layer in a benchmarking app.

This causes Android to use 2 composited layers are set up instead of 1.
On at least one device this causes a performance regression.

Fixes issue "ampere:3DMark Scores is too low"
PD#OTT-314

Test: lunch deadpool-userdebug; make -j50; fastboot flashall ; watch adb shell dumpsys SurfaceFlinger \| grep -A80 layers:
Bug: 122052559
Change-Id: Iff3fd6bc2ec6b7be81c43359b6e69b3b21c9cd8e
Signed-off-by: default avatarPengfei Zhao <pengfei.zhao@amlogic.com>
parent c444eb82
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -287,6 +287,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
        if (mPendingReportDraws > 0) {
        if (mPendingReportDraws > 0) {
            mDrawFinished = true;
            mDrawFinished = true;
            if (mAttachedToWindow) {
            if (mAttachedToWindow) {
                mParent.requestTransparentRegion(SurfaceView.this);
                notifyDrawFinished();
                notifyDrawFinished();
                invalidate();
                invalidate();
            }
            }