summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
index 126a7ac..3dceda9 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
@@ -120,7 +120,7 @@ void TileTexture::transferComplete()
void TileTexture::drawGL(bool isLayer, const SkRect& rect, float opacity,
const TransformationMatrix* transform,
- bool forceBlending)
+ bool forceBlending, bool usePointSampling)
{
ShaderProgram* shader = TilesManager::instance()->shader();
@@ -132,14 +132,15 @@ void TileTexture::drawGL(bool isLayer, const SkRect& rect, float opacity,
// For base layer, we just follow the forceBlending, otherwise, blending is
// always turned on.
// TODO: Don't blend tiles if they are fully opaque.
- forceBlending |= isLayer;
+ bool useBlending = forceBlending || isLayer;
DrawQuadData commonData(isLayer ? LayerQuad : BaseQuad, transform, &rect,
- opacity, forceBlending);
+ opacity, useBlending);
if (isPureColor()) {
PureColorQuadData data(commonData, pureColor());
shader->drawQuad(&data);
} else {
- TextureQuadData data(commonData, m_ownTextureId, GL_TEXTURE_2D, GL_LINEAR);
+ GLint filter = usePointSampling ? GL_NEAREST : GL_LINEAR;
+ TextureQuadData data(commonData, m_ownTextureId, GL_TEXTURE_2D, filter);
shader->drawQuad(&data);
}
}