summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorAlec Mouri <alecmouri@google.com>2019-12-17 09:41:48 -0800
committerAlec Mouri <alecmouri@google.com>2020-02-13 13:28:36 -0800
commit8a82b141d1fda246a9353f04a1af09144334e451 (patch)
tree7306df528405ed0c96beaeb7d4c40a7ce18fd311 /libs/hwui/renderthread/RenderProxy.cpp
parent4d5b0be4814cdef56872e61e7d04b8a81328ad2e (diff)
[HWUI] use ANativeWindow_getLastQueuedBuffer api
Bug: 137012798 Test: builds Change-Id: Ic33a21a73b0579726f47c53cc102fb91b5ead0d6
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index f9e401a2e93b..1e7fc71a7f04 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -317,8 +317,9 @@ void RenderProxy::setRenderAheadDepth(int renderAhead) {
int RenderProxy::copySurfaceInto(sp<Surface>& surface, int left, int top, int right, int bottom,
SkBitmap* bitmap) {
auto& thread = RenderThread::getInstance();
+ ANativeWindow* window = surface.get();
return static_cast<int>(thread.queue().runSync([&]() -> auto {
- return thread.readback().copySurfaceInto(*surface, Rect(left, top, right, bottom), bitmap);
+ return thread.readback().copySurfaceInto(window, Rect(left, top, right, bottom), bitmap);
}));
}