From e3c26851dc315b730ea0fe5ef35bb1db81f6d675 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 25 Jul 2011 16:36:01 -0700 Subject: Improve rendering performance on some GPUs This change sets textures filtering to GL_NEAREST by default. GL_LINEAR filtering is only used when textures are transformed with a scale or a rotation. This helps save a couple of fps on some GPUs. Change-Id: I1efaa452c2c79905f00238e54d886a37203a2ac1 --- libs/hwui/LayerCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/LayerCache.cpp') diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index 1a15e8788955..36083afd53bc 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -107,7 +107,7 @@ Layer* LayerCache::get(const uint32_t width, const uint32_t height) { layer->generateTexture(); layer->bindTexture(); layer->setFilter(GL_NEAREST, GL_NEAREST); - layer->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE); + layer->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, false); glPixelStorei(GL_UNPACK_ALIGNMENT, 4); #if DEBUG_LAYERS -- cgit v1.2.3-59-g8ed1b