summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-10-02 16:53:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-02 16:53:55 -0700
commite70c8a5ad2ef1ce0804b27608fd96b825fc4ee95 (patch)
treeeb1b7657722eff7f3def50a687872b7b68f0986c /Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
parent42326004062d6b846c3050ad03a1e80fa9db425c (diff)
parent85fb59060a0fdfcff93ae1c70dd49e0f93e55ab6 (diff)
downloadexternal_webkit-e70c8a5ad2ef1ce0804b27608fd96b825fc4ee95.zip
external_webkit-e70c8a5ad2ef1ce0804b27608fd96b825fc4ee95.tar.gz
external_webkit-e70c8a5ad2ef1ce0804b27608fd96b825fc4ee95.tar.bz2
Merge "Compensate for canvas-side vertical text translation in bounding box computation" into jb-mr1-dev
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
index c865a54..a410ba9 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
@@ -917,6 +917,8 @@ void PlatformGraphicsContextRecording::drawPosText(const void* inText, size_t by
return;
}
FloatRect bounds = approximateTextBounds(byteLength / sizeof(uint16_t), inPos, inPaint);
+ bounds.move(m_textOffset); // compensate font rendering-side translates
+
const SkPaint* paint = mRecording->recording()->getSkPaint(inPaint);
size_t posSize = sizeof(SkPoint) * paint->countText(inText, byteLength);
void* text = heap()->alloc(byteLength);