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

Commit 17cc8e94 authored by Ying Wei's avatar Ying Wei
Browse files

Add trace for TextureView#draw() call

Bug: 306458831
Test: capture a Perfetto trace locally with Reddit homepage playing embedded video and observe the new logging per frame
Change-Id: I14172edee4d36cc59b83bf373b81d17d68f6e814
parent b0e4b1fd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -424,11 +424,13 @@ public class TextureView extends View {

            TextureLayer layer = getTextureLayer();
            if (layer != null) {
                Trace.traceBegin(Trace.TRACE_TAG_VIEW, "TextureView#draw()");
                applyUpdate();
                applyTransformMatrix();

                mLayer.setLayerPaint(mLayerPaint); // ensure layer paint is up to date
                recordingCanvas.drawTextureLayer(layer);
                Trace.traceEnd(Trace.TRACE_TAG_VIEW);
            }
        }
    }