summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-21 18:01:56 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-21 18:01:56 -0700
commit37289e42b769cb9f394964ad318791723bfe50af (patch)
tree72b43cda371a519b62413d612d8c18ca5133735f /Source/WebCore/platform/graphics/android
parentdb197e8d4baa349cce657ed13e0fef9d117b06ff (diff)
parentd7fd74bf26582bbf3ba7a80420ea5ebe170be473 (diff)
downloadexternal_webkit-37289e42b769cb9f394964ad318791723bfe50af.zip
external_webkit-37289e42b769cb9f394964ad318791723bfe50af.tar.gz
external_webkit-37289e42b769cb9f394964ad318791723bfe50af.tar.bz2
Merge "Disable transform fudging for merged surfaces" into jb-dev
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp5
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.h4
2 files changed, 8 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",
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.h b/Source/WebCore/platform/graphics/android/rendering/Surface.h
index 0286259..535d2c1 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Surface.h
+++ b/Source/WebCore/platform/graphics/android/rendering/Surface.h
@@ -64,6 +64,10 @@ public:
bool hasText() { return m_hasText; }
bool isBase();
+ // don't allow transform fudging for merged layers - they need the transform
+ // static at paint time, and are always aligned to 0,0 doc coordinates.
+ bool allowTransformFudging() const { return singleLayer(); }
+
// TilePainter methods
virtual bool paint(SkCanvas* canvas);
virtual float opacity();