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

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

Issue 597053003: Move color/gradient/pattern out of StrokeData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/GraphicsContext.cpp ('k') | Source/platform/graphics/GraphicsContextState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContextState.h
diff --git a/Source/platform/graphics/GraphicsContextState.h b/Source/platform/graphics/GraphicsContextState.h
index 6663eb5d011c66ecdffa55d682c98a6dcb41a7e6..5239eedf9c2339eb687896641c6df6c433b37ef0 100644
--- a/Source/platform/graphics/GraphicsContextState.h
+++ b/Source/platform/graphics/GraphicsContextState.h
@@ -68,27 +68,24 @@ public:
void decrementSaveCount() { --m_saveCount; }
// Stroke data
- const StrokeData& strokeData() const { return m_strokeData; }
-
- void setStrokeStyle(StrokeStyle);
-
- void setStrokeThickness(float);
-
- SkColor effectiveStrokeColor() const { return applyAlpha(m_strokeData.color().rgb()); }
+ Color strokeColor() const { return m_strokeColor; }
+ SkColor effectiveStrokeColor() const { return applyAlpha(m_strokeColor.rgb()); }
void setStrokeColor(const Color&);
+ Gradient* strokeGradient() const { return m_strokeGradient.get(); }
void setStrokeGradient(const PassRefPtr<Gradient>);
void clearStrokeGradient();
+ Pattern* strokePattern() const { return m_strokePattern.get(); }
void setStrokePattern(const PassRefPtr<Pattern>);
void clearStrokePattern();
+ const StrokeData& strokeData() const { return m_strokeData; }
+ void setStrokeStyle(StrokeStyle);
+ void setStrokeThickness(float);
void setLineCap(LineCap);
-
void setLineJoin(LineJoin);
-
void setMiterLimit(float);
-
void setLineDash(const DashArray&, float);
// Fill data
@@ -158,6 +155,10 @@ private:
StrokeData m_strokeData;
+ Color m_strokeColor;
+ RefPtr<Gradient> m_strokeGradient;
+ RefPtr<Pattern> m_strokePattern;
+
Color m_fillColor;
WindRule m_fillRule;
RefPtr<Gradient> m_fillGradient;
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/GraphicsContextState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698