summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-07-10 10:10:18 -0700
committerJohn Reck <jreck@google.com>2012-07-10 10:36:12 -0700
commit22ddc4a8f76077593fba14c8cafffc74f9170dab (patch)
tree1b0d6b3587a2b159cb3f73a278be35164b50e715 /Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
parent1fcb8aa079de156851042d8e041254b7abeecc77 (diff)
downloadexternal_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.zip
external_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.tar.gz
external_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.tar.bz2
Build a clipping tree in RecordingContext
Change-Id: I967c8e2ea209c848e6a09b44390ab2228b213ca5
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
index f00bb02..2fa3805 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextSkia.cpp
@@ -174,43 +174,45 @@ void PlatformGraphicsContextSkia::canvasClip(const Path& path)
clip(path);
}
-void PlatformGraphicsContextSkia::clip(const FloatRect& rect)
+bool PlatformGraphicsContextSkia::clip(const FloatRect& rect)
{
- mCanvas->clipRect(rect);
+ return mCanvas->clipRect(rect);
}
-void PlatformGraphicsContextSkia::clip(const Path& path)
+bool PlatformGraphicsContextSkia::clip(const Path& path)
{
- mCanvas->clipPath(*path.platformPath(), SkRegion::kIntersect_Op, true);
+ return mCanvas->clipPath(*path.platformPath(), SkRegion::kIntersect_Op, true);
}
-void PlatformGraphicsContextSkia::clipConvexPolygon(size_t numPoints,
+bool PlatformGraphicsContextSkia::clipConvexPolygon(size_t numPoints,
const FloatPoint*, bool antialias)
{
if (numPoints <= 1)
- return;
+ return true;
// This is only used if HAVE_PATH_BASED_BORDER_RADIUS_DRAWING is defined
// in RenderObject.h which it isn't for us. TODO: Support that :)
+ return true;
}
-void PlatformGraphicsContextSkia::clipOut(const IntRect& r)
+bool PlatformGraphicsContextSkia::clipOut(const IntRect& r)
{
- mCanvas->clipRect(r, SkRegion::kDifference_Op);
+ return mCanvas->clipRect(r, SkRegion::kDifference_Op);
}
-void PlatformGraphicsContextSkia::clipOut(const Path& path)
+bool PlatformGraphicsContextSkia::clipOut(const Path& path)
{
- mCanvas->clipPath(*path.platformPath(), SkRegion::kDifference_Op);
+ return mCanvas->clipPath(*path.platformPath(), SkRegion::kDifference_Op);
}
-void PlatformGraphicsContextSkia::clipPath(const Path& pathToClip, WindRule clipRule)
+bool PlatformGraphicsContextSkia::clipPath(const Path& pathToClip, WindRule clipRule)
{
SkPath path = *pathToClip.platformPath();
path.setFillType(clipRule == RULE_EVENODD
? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType);
- mCanvas->clipPath(path);
+ return mCanvas->clipPath(path);
}
+
void PlatformGraphicsContextSkia::clearRect(const FloatRect& rect)
{
SkPaint paint;