Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: Source/platform/graphics/GraphicsContextState.cpp

Issue 1213723006: Drop pattern-related state from GraphicsContext(State) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContextState.cpp
diff --git a/Source/platform/graphics/GraphicsContextState.cpp b/Source/platform/graphics/GraphicsContextState.cpp
index 89f3567ba888e12aba1742732b22bfaba7680d74..0cc57a61bfb346634b90f2190aae994ecc03648e 100644
--- a/Source/platform/graphics/GraphicsContextState.cpp
+++ b/Source/platform/graphics/GraphicsContextState.cpp
@@ -34,10 +34,8 @@ GraphicsContextState::GraphicsContextState(const GraphicsContextState& other)
, m_strokeData(other.m_strokeData)
, m_strokeColor(other.m_strokeColor)
, m_strokeGradient(other.m_strokeGradient)
- , m_strokePattern(other.m_strokePattern)
, m_fillColor(other.m_fillColor)
, m_fillGradient(other.m_fillGradient)
- , m_fillPattern(other.m_fillPattern)
, m_looper(other.m_looper)
, m_textDrawingMode(other.m_textDrawingMode)
, m_colorFilter(other.m_colorFilter)
@@ -80,7 +78,6 @@ void GraphicsContextState::setStrokeThickness(float thickness)
void GraphicsContextState::setStrokeColor(const Color& color)
{
m_strokeGradient.clear();
- m_strokePattern.clear();
m_strokeColor = color;
m_strokePaint.setColor(color.rgb());
m_strokePaint.setShader(0);
@@ -89,21 +86,11 @@ void GraphicsContextState::setStrokeColor(const Color& color)
void GraphicsContextState::setStrokeGradient(const PassRefPtr<Gradient> gradient, float alpha)
{
m_strokeColor = Color::black;
- m_strokePattern.clear();
m_strokeGradient = gradient;
m_strokePaint.setColor(scaleAlpha(SK_ColorBLACK, alpha));
m_strokePaint.setShader(m_strokeGradient->shader());
}
-void GraphicsContextState::setStrokePattern(const PassRefPtr<Pattern> pattern, float alpha)
-{
- m_strokeColor = Color::black;
- m_strokeGradient.clear();
- m_strokePattern = pattern;
- m_strokePaint.setColor(scaleAlpha(SK_ColorBLACK, alpha));
- m_strokePaint.setShader(m_strokePattern->shader());
-}
-
void GraphicsContextState::setLineCap(LineCap cap)
{
m_strokeData.setLineCap(cap);
@@ -126,7 +113,6 @@ void GraphicsContextState::setFillColor(const Color& color)
{
m_fillColor = color;
m_fillGradient.clear();
- m_fillPattern.clear();
m_fillPaint.setColor(color.rgb());
m_fillPaint.setShader(0);
}
@@ -134,21 +120,11 @@ void GraphicsContextState::setFillColor(const Color& color)
void GraphicsContextState::setFillGradient(const PassRefPtr<Gradient> gradient, float alpha)
{
m_fillColor = Color::black;
- m_fillPattern.clear();
m_fillGradient = gradient;
m_fillPaint.setColor(scaleAlpha(SK_ColorBLACK, alpha));
m_fillPaint.setShader(m_fillGradient->shader());
}
-void GraphicsContextState::setFillPattern(const PassRefPtr<Pattern> pattern, float alpha)
-{
- m_fillColor = Color::black;
- m_fillGradient.clear();
- m_fillPattern = pattern;
- m_fillPaint.setColor(scaleAlpha(SK_ColorBLACK, alpha));
- m_fillPaint.setShader(m_fillPattern->shader());
-}
-
// Shadow. (This will need tweaking if we use draw loopers for other things.)
void GraphicsContextState::setDrawLooper(PassRefPtr<SkDrawLooper> drawLooper)
{
« no previous file with comments | « Source/platform/graphics/GraphicsContextState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698