Return early when we cannot allocate a hardware layer
Bug #5462308

Change-Id: I52dab809662f6f42a49ca03edc50f6b98fc35a06
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index dfcc5ea..e38b479 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -216,7 +216,8 @@
         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);