summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/layers
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-21 15:49:31 -0700
committerChris Craik <ccraik@google.com>2012-05-21 15:59:32 -0700
commitd7fd74bf26582bbf3ba7a80420ea5ebe170be473 (patch)
tree29991845f56966faaddc99b11fa526ba47607dba /Source/WebCore/platform/graphics/android/layers
parent6baa213e1806af132b1f0b1170343c5ac2bf75d3 (diff)
downloadexternal_webkit-d7fd74bf26582bbf3ba7a80420ea5ebe170be473.zip
external_webkit-d7fd74bf26582bbf3ba7a80420ea5ebe170be473.tar.gz
external_webkit-d7fd74bf26582bbf3ba7a80420ea5ebe170be473.tar.bz2
Disable transform fudging for merged surfaces
Draw transforms are used at painting time for merged surfaces, so they shouldn't be manipulated in the draw path. The fudging isn't necessary for these surfaces in the first place, as merged surfaces are always aligned to pixel coordinates. bug:6156523 Change-Id: I3d954869188008f1a9e35915df893d75b49be6a2
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
index 6e88081..182e811 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
@@ -411,9 +411,12 @@ void LayerAndroid::updateGLPositionsAndScale(const TransformationMatrix& parentM
-anchorPointZ());
setDrawTransform(localMatrix);
- if (m_drawTransform.isIdentityOrTranslation()) {
+ if (m_drawTransform.isIdentityOrTranslation()
+ && surface() && surface()->allowTransformFudging()) {
// adjust the translation coordinates of the draw transform matrix so
// that layers (defined in content coordinates) will align to display/view pixels
+
+ // the surface may not allow fudging if it uses the draw transform at paint time
float desiredContentX = round(m_drawTransform.m41() * scale) / scale;
float desiredContentY = round(m_drawTransform.m42() * scale) / scale;
ALOGV("fudging translation from %f, %f to %f, %f",