summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/skia
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-04-28 16:37:06 -0400
committerMike Reed <reed@google.com>2009-04-28 16:51:54 -0400
commit8ee0eadb00b2146116f05e730a8a5bd025f9b2af (patch)
tree9bdcc24d5a3ac0054e133fe45f9d4ea47d8283d6 /WebCore/platform/graphics/skia
parent0296aca4034b6c5c6509ad09d0144405f44c4ba1 (diff)
downloadexternal_webkit-8ee0eadb00b2146116f05e730a8a5bd025f9b2af.zip
external_webkit-8ee0eadb00b2146116f05e730a8a5bd025f9b2af.tar.gz
external_webkit-8ee0eadb00b2146116f05e730a8a5bd025f9b2af.tar.bz2
First cut at sharing graphics code with chrome
Introduce (short lived I hope) platform SKIA_SGL, signifying that this code is used by both platforms (SKIA) and (SGL). This change is meant to be the foundation for more significant sharing later (e.g. TransformationMatrix, Pattern, Gradient, etc.)
Diffstat (limited to 'WebCore/platform/graphics/skia')
-rw-r--r--WebCore/platform/graphics/skia/SkiaUtils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/skia/SkiaUtils.cpp b/WebCore/platform/graphics/skia/SkiaUtils.cpp
index 6d9ffe2..af168a2 100644
--- a/WebCore/platform/graphics/skia/SkiaUtils.cpp
+++ b/WebCore/platform/graphics/skia/SkiaUtils.cpp
@@ -151,7 +151,12 @@ bool SkPathContainsPoint(SkPath* originalPath, const FloatPoint& point, SkPath::
int scale = 1;
SkRect bounds;
+#if PLATFORM(SGL)
+ // this is the API from skia/trunk
+ bounds = originalPath->getBounds();
+#else
originalPath->computeBounds(&bounds, SkPath::kFast_BoundsType);
+#endif
// We can immediately return false if the point is outside the bounding rect
if (!bounds.contains(SkFloatToScalar(point.x()), SkFloatToScalar(point.y())))