Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: cc/tiled_layer_impl.cc

Issue 11358181: Use nearest neighbor filtering for non-translated quads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/tiled_layer_impl_unittest.cc » ('j') | cc/tiled_layer_impl_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiled_layer_impl.cc
diff --git a/cc/tiled_layer_impl.cc b/cc/tiled_layer_impl.cc
index b7fe7b81e1004f0c5023cbbc00cfee4a3105d7ed..c8973200e6f7e6ac00763a0c08d2238b59f42743 100644
--- a/cc/tiled_layer_impl.cc
+++ b/cc/tiled_layer_impl.cc
@@ -198,7 +198,7 @@ void TiledLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad
bool rightEdgeAA = i == m_tiler->numTilesX() - 1 && useAA;
bool bottomEdgeAA = j == m_tiler->numTilesY() - 1 && useAA;
- const GLint textureFilter = m_tiler->hasBorderTexels() ? GL_LINEAR : GL_NEAREST;
+ const GLint textureFilter = m_tiler->hasBorderTexels() && !drawTransform().isIdentityOrTranslation() ? GL_LINEAR : GL_NEAREST;
jamesr 2012/11/09 18:40:09 for non-integer translations we still need GL_LINE
Sami 2012/11/11 16:56:27 Excellent point. I've changed this to use isIntege
quadSink.append(TileDrawQuad::create(sharedQuadState, tileRect, tileOpaqueRect, tile->resourceId(), textureOffset, textureSize, textureFilter, tile->contentsSwizzled(), leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA).PassAs<DrawQuad>(), appendQuadsData);
}
}
« no previous file with comments | « no previous file | cc/tiled_layer_impl_unittest.cc » ('j') | cc/tiled_layer_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698