diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp index 00afd07..df680eb 100644 --- a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp +++ b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp @@ -1025,6 +1025,14 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, if (paintingDisabled()) return; + if (platformContext()->useGPU()) { + GLES2Canvas* canvas = platformContext()->gpuCanvas(); + canvas->setShadowOffset(size); + canvas->setShadowBlur(blurFloat); + canvas->setShadowColor(color, colorSpace); + canvas->setShadowsIgnoreTransforms(m_state.shadowsIgnoreTransforms); + } + // Detect when there's no effective shadow and clear the looper. if (!size.width() && !size.height() && !blurFloat) { platformContext()->setDrawLooper(0); @@ -1035,14 +1043,15 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, double height = size.height(); double blur = blurFloat; - SkBlurDrawLooper::BlurFlags blurFlags = SkBlurDrawLooper::kNone_BlurFlag; + uint32_t blurFlags = SkBlurDrawLooper::kHighQuality_BlurFlag | + SkBlurDrawLooper::kOverrideColor_BlurFlag; if (m_state.shadowsIgnoreTransforms) { // Currently only the GraphicsContext associated with the // CanvasRenderingContext for HTMLCanvasElement have shadows ignore // Transforms. So with this flag set, we know this state is associated // with a CanvasRenderingContext. - blurFlags = SkBlurDrawLooper::kIgnoreTransform_BlurFlag; + blurFlags |= SkBlurDrawLooper::kIgnoreTransform_BlurFlag; // CG uses natural orientation for Y axis, but the HTML5 canvas spec // does not. |