summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLReadback.cpp
diff options
context:
space:
mode:
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);