Loading core/java/android/view/View.java +12 −0 Original line number Diff line number Diff line Loading @@ -10114,8 +10114,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mLocalDirtyRect.setEmpty(); } // The layer is not valid if the underlying GPU resources cannot be allocated if (!mHardwareLayer.isValid()) { return null; } HardwareCanvas currentCanvas = mAttachInfo.mHardwareCanvas; final HardwareCanvas canvas = mHardwareLayer.start(currentCanvas); // Make sure all the GPU resources have been properly allocated if (canvas == null) { mHardwareLayer.end(currentCanvas); return null; } mAttachInfo.mHardwareCanvas = canvas; try { canvas.setViewport(width, height); Loading libs/hwui/LayerRenderer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -216,7 +216,8 @@ Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque layer->allocateTexture(GL_RGBA, GL_UNSIGNED_BYTE); if (glGetError() != GL_NO_ERROR) { LOGD("Could not allocate texture"); LOGD("Could not allocate texture for layer (fbo=%d %dx%d)", fbo, width, height); glBindFramebuffer(GL_FRAMEBUFFER, previousFbo); Caches::getInstance().fboCache.put(fbo); Loading Loading
core/java/android/view/View.java +12 −0 Original line number Diff line number Diff line Loading @@ -10114,8 +10114,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mLocalDirtyRect.setEmpty(); } // The layer is not valid if the underlying GPU resources cannot be allocated if (!mHardwareLayer.isValid()) { return null; } HardwareCanvas currentCanvas = mAttachInfo.mHardwareCanvas; final HardwareCanvas canvas = mHardwareLayer.start(currentCanvas); // Make sure all the GPU resources have been properly allocated if (canvas == null) { mHardwareLayer.end(currentCanvas); return null; } mAttachInfo.mHardwareCanvas = canvas; try { canvas.setViewport(width, height); Loading
libs/hwui/LayerRenderer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -216,7 +216,8 @@ Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque layer->allocateTexture(GL_RGBA, GL_UNSIGNED_BYTE); if (glGetError() != GL_NO_ERROR) { LOGD("Could not allocate texture"); LOGD("Could not allocate texture for layer (fbo=%d %dx%d)", fbo, width, height); glBindFramebuffer(GL_FRAMEBUFFER, previousFbo); Caches::getInstance().fboCache.put(fbo); Loading