diff options
author | Mike Reed <reed@google.com> | 2009-04-28 16:37:06 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-04-28 16:51:54 -0400 |
commit | 8ee0eadb00b2146116f05e730a8a5bd025f9b2af (patch) | |
tree | 9bdcc24d5a3ac0054e133fe45f9d4ea47d8283d6 /WebCore/platform/graphics/skia | |
parent | 0296aca4034b6c5c6509ad09d0144405f44c4ba1 (diff) | |
download | external_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.cpp | 5 |
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()))) |