summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-02-25 18:50:17 -0800
committerChris Craik <ccraik@google.com>2014-02-25 18:50:17 -0800
commit9757ac0b9d62f6aea5e47cfb375f445c78bb7897 (patch)
treed17c80970154798e66dbf914974926b15fa33f61 /libs/hwui/OpenGLRenderer.cpp
parent5eb4adcbda0ff22e48716d3cf9356a9a720475b5 (diff)
downloadframeworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.zip
frameworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.tar.gz
frameworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.tar.bz2
Fix TextureView texture filtering.
bug:11748993 TextureView should always be drawn with linear filtering if drawing a buffer sized differently from the layer. This fixes a bug where TextureViews that were sized differently from their contents wouldn't be drawn with texture filtering, causing visible scaling artifacts. Change-Id: I8a5d27452fe7269ec53896992f37cff51e3ce15a
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 2da0fd3..c507c81 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1068,6 +1068,7 @@ void OpenGLRenderer::drawTextureLayer(Layer* layer, const Rect& rect) {
setupDrawExternalTexture(layer->getTexture());
}
if (currentTransform()->isPureTranslate() &&
+ !layer->getForceFilter() &&
layer->getWidth() == (uint32_t) rect.getWidth() &&
layer->getHeight() == (uint32_t) rect.getHeight()) {
const float x = (int) floorf(rect.left + currentTransform()->getTranslateX() + 0.5f);