From 0b8560dee52ce9d55cda03caa5f2a3e733b55ba3 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Wed, 26 Oct 2011 15:14:51 +0100 Subject: Add missing save/restore calls to GraphicsContext::fillRect Android is missing some calls to GraphicsContext::save/restore inside our GraphicsContext::fillRect implementations. The calls were added to the Skia GraphicsContext in http://trac.webkit.org/changeset/63102 Bug: 5361502 Change-Id: Ifcbc116d997473e3a184561102dc5cb74f5aa5ec --- Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/WebCore/platform/graphics') diff --git a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 86e1f63..f647673 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -782,6 +782,7 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLef void GraphicsContext::fillRect(const FloatRect& rect) { + save(); SkPaint paint; m_data->setupPaintFill(&paint); @@ -791,6 +792,7 @@ void GraphicsContext::fillRect(const FloatRect& rect) m_state.fillGradient.get()); GC2CANVAS(this)->drawRect(rect, paint); + restore(); } void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace) @@ -799,6 +801,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS return; if (color.rgb() & 0xFF000000) { + save(); SkPaint paint; m_data->setupPaintCommon(&paint); @@ -828,6 +831,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS paint.setAntiAlias(false); GC2CANVAS(this)->drawRect(rect, paint); + restore(); } } -- cgit v1.1