diff options
author | Steve Block <steveblock@google.com> | 2011-11-24 14:02:29 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-11-24 14:02:29 +0000 |
commit | 7839f0a8c60340239148921eb35c3e2afc750701 (patch) | |
tree | 3d658e1608d073dfb43f921e9130d659f582751b /Source/WebCore/platform | |
parent | 3eaf0f8cdb150a43732c8391a73046811b3c378d (diff) | |
download | external_webkit-7839f0a8c60340239148921eb35c3e2afc750701.zip external_webkit-7839f0a8c60340239148921eb35c3e2afc750701.tar.gz external_webkit-7839f0a8c60340239148921eb35c3e2afc750701.tar.bz2 |
Fix SVG text rendering
Android's implementation of GraphicsContext::setCTM() is broken, because Skia's
Picture mode does not support setMatrix(). This broken code was added in
https://android-git.corp.google.com/g/#/c/112636 as part of the merge to WebKit
r80534.
This change modifies SVGInlineTextBox to avoid calling
GraphicsContext::setCTM() and makes clear that the method should not be used.
Bug: 5590123
Change-Id: I45a3c8c356b7f068bb943a45b9f10cbc041331e2
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index f647673..a490d5f 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -1207,10 +1207,11 @@ AffineTransform GraphicsContext::getCTM() const void GraphicsContext::setCTM(const AffineTransform& transform) { - if (paintingDisabled()) - return; - - GC2CANVAS(this)->setMatrix(transform); + // The SkPicture mode of Skia does not support SkCanvas::setMatrix(), so we + // can not simply use that method here. We could calculate the transform + // required to achieve the desired matrix and use SkCanvas::concat(), but + // there's currently no need for this. + ASSERT_NOT_REACHED(); } /////////////////////////////////////////////////////////////////////////////// |