summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-09-16 14:16:48 -0700
committer Romain Guy <romainguy@google.com> 2010-09-16 14:16:48 -0700
commitb025b9c8b4efefadb01937db61a1f8ee7d2452bf (patch)
treedabed85e1e6b4aad2363925c779b783855b02d7e /libs/hwui/LayerCache.cpp
parent857d7cf80ee37fc3b1d55ecfa4c27029672f5114 (diff)
Better error handling in the OpenGL renderer.
Add a glGetError() check on every frame Don't attempt to create textures larger than the maximum size allowed Change-Id: Iee4afae16089406dbe8bf10fc93b674f1271a0ca
Diffstat (limited to 'libs/hwui/LayerCache.cpp')
-rw-r--r--libs/hwui/LayerCache.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index 1a18766e1d2e..39c311115167 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -110,11 +110,9 @@ Layer* LayerCache::get(LayerSize& size) {
layer = new Layer;
layer->blend = true;
- // Generate the texture in which the FBO will draw
glGenTextures(1, &layer->texture);
glBindTexture(GL_TEXTURE_2D, layer->texture);
- // The FBO will not be scaled, so we can use lower quality filtering
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);