diff options
author | 2017-09-22 22:41:59 +0000 | |
---|---|---|
committer | 2017-09-22 22:41:59 +0000 | |
commit | a6aafa33ec24ce2fb8d9460acf23b40c951edd90 (patch) | |
tree | 6bc90845da8e0e7c0e4daa971634a58bde22ee57 /libs/hwui/OpenGLReadback.cpp | |
parent | 6f50d163387887eb4d311c70b8699644ee51d275 (diff) | |
parent | 89cd62c8f31d2029263f41d050cf806bfb9935f5 (diff) |
Merge "Speculative fix for missing target crash" into oc-mr1-dev
Diffstat (limited to 'libs/hwui/OpenGLReadback.cpp')
-rw-r--r-- | libs/hwui/OpenGLReadback.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLReadback.cpp b/libs/hwui/OpenGLReadback.cpp index f9a1cc5296d5..2687410897ac 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); |