summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-01-13 14:52:40 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-01-13 14:59:55 -0800
commitb386bb15aeef6575bfe634c9ee69d473243d2563 (patch)
tree356d93405a2d0109bfc4e2f915b4ac8ba9a83679 /WebCore
parentb3821dbf4f4d56f745a9782b36fa14b56f5cc3c8 (diff)
downloadexternal_webkit-b386bb15aeef6575bfe634c9ee69d473243d2563.zip
external_webkit-b386bb15aeef6575bfe634c9ee69d473243d2563.tar.gz
external_webkit-b386bb15aeef6575bfe634c9ee69d473243d2563.tar.bz2
More debug info for each layer
The matrix info can help to determine the layer positioning issue. Change-Id: Ie254e13d649c6a3aab820e8fe9553517ca42be72
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp
index 853662f..aec039d 100644
--- a/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -498,7 +498,7 @@ void LayerAndroid::updateGLPositions(const TransformationMatrix& parentMatrix,
setDrawOpacity(opacity);
if (m_haveClip) {
- //The clipping rect calculation and intersetion will be done in Screen Coord now.
+ // The clipping rect calculation and intersetion will be done in Screen Coord now.
FloatRect clip =
TilesManager::instance()->shader()->clipRectInScreenCoord(drawTransform(), layerSize);
clip.intersect(clipping);
@@ -905,6 +905,18 @@ void writeLength(FILE* file, int indentLevel, const char* str, SkLength length)
fprintf(file, "%s = { type = %d; value = %.2f; };\n", str, length.type, length.value);
}
+void writeMatrix(FILE* file, int indentLevel, const char* str, const TransformationMatrix& matrix)
+{
+ writeIndent(file, indentLevel);
+ fprintf(file, "%s = { (%.2f,%.2f,%.2f,%.2f),(%.2f,%.2f,%.2f,%.2f),"
+ "(%.2f,%.2f,%.2f,%.2f),(%.2f,%.2f,%.2f,%.2f) };\n",
+ str,
+ matrix.m11(), matrix.m12(), matrix.m13(), matrix.m14(),
+ matrix.m21(), matrix.m22(), matrix.m23(), matrix.m24(),
+ matrix.m31(), matrix.m32(), matrix.m33(), matrix.m34(),
+ matrix.m41(), matrix.m42(), matrix.m43(), matrix.m44());
+}
+
void LayerAndroid::dumpLayers(FILE* file, int indentLevel) const
{
writeln(file, indentLevel, "{");
@@ -920,6 +932,9 @@ void LayerAndroid::dumpLayers(FILE* file, int indentLevel) const
writePoint(file, indentLevel + 1, "position", getPosition());
writePoint(file, indentLevel + 1, "anchor", getAnchorPoint());
+ writeMatrix(file, indentLevel + 1, "drawMatrix", drawTransform());
+ writeMatrix(file, indentLevel + 1, "transformMatrix", m_transform);
+
if (m_isFixed) {
writeLength(file, indentLevel + 1, "fixedLeft", m_fixedLeft);
writeLength(file, indentLevel + 1, "fixedTop", m_fixedTop);