Index: Source/platform/graphics/GraphicsContextState.cpp |
diff --git a/Source/platform/graphics/GraphicsContextState.cpp b/Source/platform/graphics/GraphicsContextState.cpp |
index 657d0df5fb03942dbf1f6e356445b25f861889f6..1424bf473c4006f6ca58b8f2a11e92685da6057c 100644 |
--- a/Source/platform/graphics/GraphicsContextState.cpp |
+++ b/Source/platform/graphics/GraphicsContextState.cpp |
@@ -47,6 +47,7 @@ GraphicsContextState::GraphicsContextState(const GraphicsContextState& other) |
, m_fillGradient(other.m_fillGradient) |
, m_fillPattern(other.m_fillPattern) |
, m_looper(other.m_looper) |
+ , m_imageFilter(other.m_imageFilter) |
, m_textDrawingMode(other.m_textDrawingMode) |
, m_alpha(other.m_alpha) |
, m_colorFilter(other.m_colorFilter) |
@@ -204,6 +205,21 @@ void GraphicsContextState::clearDrawLooper() |
m_fillPaint.setLooper(0); |
} |
+// Shadow. (This will need tweaking if we use image filters for other things.) |
Stephen White
2014/10/23 01:45:47
Pls remove this comment.
sugoi1
2014/10/23 17:43:17
Done.
|
+void GraphicsContextState::setImageFilter(PassRefPtr<SkImageFilter> imageFilter) |
+{ |
+ m_imageFilter = imageFilter; |
+ m_strokePaint.setImageFilter(m_imageFilter.get()); |
Stephen White
2014/10/23 01:45:47
I don't think this is correct. If we set an image
sugoi1
2014/10/23 17:43:17
Done.
|
+ m_fillPaint.setImageFilter(m_imageFilter.get()); |
+} |
+ |
+void GraphicsContextState::clearImageFilter() |
+{ |
+ m_imageFilter.clear(); |
+ m_strokePaint.setImageFilter(0); |
Stephen White
2014/10/23 01:45:47
Same here.
sugoi1
2014/10/23 17:43:17
Done.
|
+ m_fillPaint.setImageFilter(0); |
+} |
+ |
void GraphicsContextState::setAlphaAsFloat(float alpha) |
{ |
if (alpha < 0) { |