diff options
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
-rw-r--r-- | libs/hwui/LayerRenderer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index d9b40ae..00add29 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -14,15 +14,13 @@ * limitations under the License. */ -#define LOG_TAG "OpenGLRenderer" -#define ATRACE_TAG ATRACE_TAG_VIEW - #include "LayerCache.h" #include "LayerRenderer.h" #include "Matrix.h" #include "Properties.h" #include "Rect.h" #include "renderstate/RenderState.h" +#include "utils/GLUtils.h" #include "utils/TraceUtils.h" #include <ui/Rect.h> @@ -238,8 +236,9 @@ Layer* LayerRenderer::createRenderLayer(RenderState& renderState, uint32_t width layer->allocateTexture(); // This should only happen if we run out of memory - if (glGetError() != GL_NO_ERROR) { - ALOGE("Could not allocate texture for layer (fbo=%d %dx%d)", fbo, width, height); + if (CC_UNLIKELY(GLUtils::dumpGLErrors())) { + LOG_ALWAYS_FATAL("Could not allocate texture for layer (fbo=%d %dx%d)", + fbo, width, height); renderState.bindFramebuffer(previousFbo); layer->decStrong(nullptr); return nullptr; |