diff options
-rw-r--r-- | WebCore/platform/graphics/android/PathAndroid.cpp | 10 | ||||
-rw-r--r-- | WebKit/android/jni/PictureSet.cpp | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp index cfcd2bc..af870f5 100644 --- a/WebCore/platform/graphics/android/PathAndroid.cpp +++ b/WebCore/platform/graphics/android/PathAndroid.cpp @@ -89,9 +89,7 @@ void Path::translate(const FloatSize& size) FloatRect Path::boundingRect() const { - SkRect r; - - m_path->computeBounds(&r, SkPath::kExact_BoundsType); + const SkRect& r = m_path->getBounds(); return FloatRect( SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop), SkScalarToFloat(r.width()), @@ -283,9 +281,9 @@ static FloatRect boundingBoxForCurrentStroke(GraphicsContext* context) context->setupStrokePaint(&paint); SkPath fillPath; paint.getFillPath(*path, &fillPath); - SkRect r; - fillPath.computeBounds(&r, SkPath::kExact_BoundsType); - return FloatRect(r.fLeft, r.fTop, r.width(), r.height()); + const SkRect& r = fillPath.getBounds(); + return FloatRect(SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop), + SkScalarToFloat(r.width()), SkScalarToFloat(r.height())); } static GraphicsContext* scratchContext() diff --git a/WebKit/android/jni/PictureSet.cpp b/WebKit/android/jni/PictureSet.cpp index ac3f38a..e8fcba5 100644 --- a/WebKit/android/jni/PictureSet.cpp +++ b/WebKit/android/jni/PictureSet.cpp @@ -263,7 +263,7 @@ bool PictureSet::draw(SkCanvas* canvas) SkPath pathClip; area.getBoundaryPath(&pathClip); canvas->clipPath(pathClip); - pathClip.computeBounds(&pathBounds, SkPath::kFast_BoundsType); + pathBounds = pathClip.getBounds(); } else { pathBounds.set(area.getBounds()); canvas->clipRect(pathBounds); |