diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp index 51e2477..1a7112b 100644 --- a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp +++ b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp @@ -386,6 +386,9 @@ void GraphicsContext::canvasClip(const Path& path) if (paintingDisabled()) return; + if (platformContext()->useGPU()) + platformContext()->gpuCanvas()->clipPath(path); + const SkPath& p = *path.platformPath(); if (!isPathSkiaSafe(getCTM(), p)) return; @@ -410,6 +413,9 @@ void GraphicsContext::clipOut(const Path& p) if (paintingDisabled()) return; + if (platformContext()->useGPU()) + platformContext()->gpuCanvas()->clipOut(p); + const SkPath& path = *p.platformPath(); if (!isPathSkiaSafe(getCTM(), path)) return; @@ -422,6 +428,9 @@ void GraphicsContext::clipPath(const Path& pathToClip, WindRule clipRule) if (paintingDisabled()) return; + if (platformContext()->useGPU()) + platformContext()->gpuCanvas()->clipPath(pathToClip); + // FIXME: Be smarter about this. beginPath(); addPath(pathToClip); @@ -733,6 +742,12 @@ void GraphicsContext::fillPath(const Path& pathToFill) beginPath(); addPath(pathToFill); + if (platformContext()->useGPU() && platformContext()->canAccelerate()) { + platformContext()->prepareForHardwareDraw(); + platformContext()->gpuCanvas()->fillPath(pathToFill); + return; + } + SkPath path = platformContext()->currentPathInLocalCoordinates(); if (!isPathSkiaSafe(getCTM(), path)) return; |