summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-04-20 10:14:28 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-20 10:14:28 -0700
commite448c08e0f1ff5c948071498d73ff9b40a52fd21 (patch)
treeb7425aeed2d034ec9ddff8c492a016ab04413559
parent9011f30e569e6d05a2e4a39db84b07703a4c194b (diff)
parent8804f0848d7d3165c86cbb529e3b51cffdb4b56b (diff)
downloadexternal_webkit-e448c08e0f1ff5c948071498d73ff9b40a52fd21.zip
external_webkit-e448c08e0f1ff5c948071498d73ff9b40a52fd21.tar.gz
external_webkit-e448c08e0f1ff5c948071498d73ff9b40a52fd21.tar.bz2
am 8804f084: Fix for clipped layers
* commit '8804f0848d7d3165c86cbb529e3b51cffdb4b56b': Fix for clipped layers
-rw-r--r--WebCore/platform/graphics/android/ShaderProgram.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/ShaderProgram.cpp b/WebCore/platform/graphics/android/ShaderProgram.cpp
index efa53ae..74328a1 100644
--- a/WebCore/platform/graphics/android/ShaderProgram.cpp
+++ b/WebCore/platform/graphics/android/ShaderProgram.cpp
@@ -259,17 +259,23 @@ void ShaderProgram::setViewRect(const IntRect& viewRect)
// content coordinates in screen coordinates.
TransformationMatrix translate;
translate.translate(1.0, 1.0);
+
+ TransformationMatrix screenTranslate;
+ screenTranslate.translate(-viewRect.x(), -viewRect.y());
+
TransformationMatrix scale;
scale.scale3d(m_viewRect.width() * 0.5f, m_viewRect.height() * 0.5f, 1);
m_documentToScreenMatrix = m_projectionMatrix;
m_documentToScreenMatrix.multiply(translate);
m_documentToScreenMatrix.multiply(scale);
+ m_documentToScreenMatrix.multiply(screenTranslate);
m_documentToInvScreenMatrix = m_projectionMatrix;
translate.scale3d(1, -1, 1);
m_documentToInvScreenMatrix.multiply(translate);
m_documentToInvScreenMatrix.multiply(scale);
+ m_documentToScreenMatrix.multiply(screenTranslate);
}
// This function transform a clip rect extracted from the current layer