summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLReadback.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2017-09-22 09:31:05 -0700
committer Chris Craik <ccraik@google.com> 2017-09-22 10:00:14 -0700
commit89cd62c8f31d2029263f41d050cf806bfb9935f5 (patch)
tree18a490257a7c37d110ea5c90666315375f239492 /libs/hwui/OpenGLReadback.cpp
parent94fa7ee97272b0a4a8104a20eb201fb9891cd102 (diff)
Speculative fix for missing target crash
Bug: 66451158 Test: manual app usage Change-Id: I2db3aa73edcb80da25ead64205011705f0beef91
Diffstat (limited to 'libs/hwui/OpenGLReadback.cpp')
-rw-r--r--libs/hwui/OpenGLReadback.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLReadback.cpp b/libs/hwui/OpenGLReadback.cpp
index 025503b15975..5c4263e03abc 100644
--- a/libs/hwui/OpenGLReadback.cpp
+++ b/libs/hwui/OpenGLReadback.cpp
@@ -280,6 +280,11 @@ CopyResult OpenGLReadbackImpl::copyImageInto(EGLImageKHR eglImage,
bool OpenGLReadbackImpl::copyLayerInto(renderthread::RenderThread& renderThread,
GlLayer& layer, SkBitmap* bitmap) {
+ if (!layer.isRenderable()) {
+ // layer has never been updated by DeferredLayerUpdater, abort copy
+ return false;
+ }
+
return CopyResult::Success == copyTextureInto(Caches::getInstance(),
renderThread.renderState(), layer.getTexture(), layer.getTexTransform(),
Rect(), bitmap);