summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2021-05-19 11:39:13 -0700
committerScott Lobdell <slobdell@google.com>2021-05-21 00:34:23 +0000
commit219787565ff982848d596fa8743cd132af113e6b (patch)
tree93bd3c94771fb966fdf611d38865e712fb83e969 /libs/hwui/renderthread/CanvasContext.cpp
parent7b4a006d559a571313e36799d93af7e3c6b69c82 (diff)
parent75eb1dd292d1800d660c5146464264b25854d318 (diff)
Merge SP1A.210513.004
Change-Id: Ic23aece12c3bbd2b4dcf3205fdbcdd1601deabec
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index bba22071ecef..bae1ab5bab44 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -467,11 +467,11 @@ void CanvasContext::notifyFramePending() {
mRenderThread.pushBackFrameCallback(this);
}
-void CanvasContext::draw() {
+nsecs_t CanvasContext::draw() {
if (auto grContext = getGrContext()) {
if (grContext->abandoned()) {
LOG_ALWAYS_FATAL("GrContext is abandoned/device lost at start of CanvasContext::draw");
- return;
+ return 0;
}
}
SkRect dirty;
@@ -486,7 +486,7 @@ void CanvasContext::draw() {
std::invoke(func, mFrameNumber);
}
mFrameCompleteCallbacks.clear();
- return;
+ return 0;
}
ScopedActiveContext activeContext(this);
@@ -616,6 +616,7 @@ void CanvasContext::draw() {
}
mRenderThread.cacheManager().onFrameCompleted();
+ return mCurrentFrameInfo->get(FrameInfoIndex::DequeueBufferDuration);
}
void CanvasContext::reportMetricsWithPresentTime() {