summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/skia/PathSkia.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
committerFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
commit1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch)
treecad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/graphics/skia/PathSkia.cpp
parentb83fc086000e27bc227580bd0e35b9d7bee1179a (diff)
parentc9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff)
downloadexternal_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
Diffstat (limited to 'WebCore/platform/graphics/skia/PathSkia.cpp')
-rw-r--r--WebCore/platform/graphics/skia/PathSkia.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp
index 2700da8..9d9df52 100644
--- a/WebCore/platform/graphics/skia/PathSkia.cpp
+++ b/WebCore/platform/graphics/skia/PathSkia.cpp
@@ -81,9 +81,15 @@ void Path::translate(const FloatSize& size)
FloatRect Path::boundingRect() const
{
+ // FIXME: This #ifdef can go away once we're firmly using the new Skia.
+ // During the transition, this makes the code compatible with both versions.
+#ifdef SK_USE_OLD_255_TO_256
+ return m_path->getBounds();
+#else
SkRect rect;
m_path->computeBounds(&rect, SkPath::kExact_BoundsType);
return rect;
+#endif
}
void Path::moveTo(const FloatPoint& point)
@@ -275,9 +281,15 @@ static FloatRect boundingBoxForCurrentStroke(const GraphicsContext* context)
context->platformContext()->setupPaintForStroking(&paint, 0, 0);
SkPath boundingPath;
paint.getFillPath(context->platformContext()->currentPathInLocalCoordinates(), &boundingPath);
+ // FIXME: This #ifdef can go away once we're firmly using the new Skia.
+ // During the transition, this makes the code compatible with both versions.
+#ifdef SK_USE_OLD_255_TO_256
+ return boundingPath.getBounds();
+#else
SkRect r;
boundingPath.computeBounds(&r, SkPath::kExact_BoundsType);
return r;
+#endif
}
FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)