summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 733e5e0..6d7dcf1 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -46,7 +46,8 @@ CanvasContext::CanvasContext(RenderThread& thread, bool translucent,
, mOpaque(!translucent)
, mAnimationContext(contextFactory->createAnimationContext(mRenderThread.timeLord()))
, mRootRenderNode(rootRenderNode)
- , mJankTracker(thread.timeLord().frameIntervalNanos()) {
+ , mJankTracker(thread.timeLord().frameIntervalNanos())
+ , mProfiler(mFrames) {
mRenderThread.renderState().registerCanvasContext(this);
mProfiler.setDensity(mRenderThread.mainDisplayInfo().density);
}
@@ -218,7 +219,6 @@ void CanvasContext::draw() {
return;
}
- profiler().markPlaybackStart();
mCurrentFrameInfo->markIssueDrawCommandsStart();
EGLint width, height;
@@ -251,8 +251,6 @@ void CanvasContext::draw() {
bool drew = mCanvas->finish();
- profiler().markPlaybackEnd();
-
// Even if we decided to cancel the frame, from the perspective of jank
// metrics the frame was swapped at this point
mCurrentFrameInfo->markSwapBuffers();
@@ -267,7 +265,6 @@ void CanvasContext::draw() {
mCurrentFrameInfo->markFrameCompleted();
mJankTracker.addFrame(*mCurrentFrameInfo);
mRenderThread.jankTracker().addFrame(*mCurrentFrameInfo);
- profiler().finishFrame();
}
// Called by choreographer to do an RT-driven animation
@@ -278,7 +275,6 @@ void CanvasContext::doFrame() {
ATRACE_CALL();
- profiler().startFrame();
int64_t frameInfo[UI_THREAD_FRAME_INFO_SIZE];
UiFrameInfoBuilder(frameInfo)
.addFlag(FrameInfoFlags::kRTAnimation)