diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-12 15:47:31 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2012-05-12 15:47:31 -0700 |
commit | 50e68fd22b9f6e50888f33852ed0716f59e19a1d (patch) | |
tree | bc10ffc1cbc399efe72299448b7f6ffa3e6fc677 /Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | |
parent | cedc69e9625169d4d585fcd019af2ea5597f0ed1 (diff) | |
download | external_webkit-50e68fd22b9f6e50888f33852ed0716f59e19a1d.zip external_webkit-50e68fd22b9f6e50888f33852ed0716f59e19a1d.tar.gz external_webkit-50e68fd22b9f6e50888f33852ed0716f59e19a1d.tar.bz2 |
Add some debugging info in visual mode
bug:6331760
Change-Id: Iddc044c11bf7fcb96e061e346481d0228803cc9e
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index a6e7e2b..73ae26f 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -26,6 +26,7 @@ #include "SkDrawFilter.h" #include "SkPaint.h" #include "SkPicture.h" +#include "SkTypeface.h" #include "Surface.h" #include "TilesManager.h" @@ -939,6 +940,16 @@ void LayerAndroid::contentDraw(SkCanvas* canvas, PaintStyle style) canvas->drawLine(0, h-1, w-1, h-1, paint); canvas->drawLine(w-1, h-1, w-1, 0, paint); canvas->drawLine(w-1, 0, 0, 0, paint); + + static SkTypeface* s_typeface = 0; + if (!s_typeface) + s_typeface = SkTypeface::CreateFromName("", SkTypeface::kBold); + paint.setARGB(255, 0, 0, 255); + paint.setTextSize(17); + char str[256]; + snprintf(str, 256, "%d", uniqueId()); + paint.setTypeface(s_typeface); + canvas->drawText(str, strlen(str), 2, h - 2, paint); } if (m_fixedPosition) |