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

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

Issue 169283008: Maintain SkPaint in GraphicsContextState. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ready for review. Created 6 years, 10 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
Index: Source/platform/graphics/Gradient.h
diff --git a/Source/platform/graphics/Gradient.h b/Source/platform/graphics/Gradient.h
index 0fa5814555fb552985449762c87e04871aacad40..42a5c68ca163dc684186efdfc294f9a3d514946b 100644
--- a/Source/platform/graphics/Gradient.h
+++ b/Source/platform/graphics/Gradient.h
@@ -72,6 +72,7 @@ public:
void addColorStop(float, const Color&);
bool hasAlpha() const;
+ bool shaderChanged() const { return m_shaderChanged; }
f(malita) 2014/03/04 14:23:47 How about return !m_shader? Gradient already t
Stephen Chennney 2014/03/04 14:47:10 Done.
bool isRadial() const { return m_radial; }
bool isZeroSize() const { return m_p0.x() == m_p1.x() && m_p0.y() == m_p1.y() && (!m_radial || m_r0 == m_r1); }
@@ -135,15 +136,15 @@ private:
void sortStopsIfNecessary();
- // Keep any parameters relevant to rendering in sync with the structure in Gradient::hash().
- bool m_radial;
FloatPoint m_p0;
FloatPoint m_p1;
float m_r0;
float m_r1;
float m_aspectRatio; // For elliptical gradient, width / height.
mutable Vector<ColorStop, 2> m_stops;
+ bool m_radial;
mutable bool m_stopsSorted;
+ bool m_shaderChanged;
f(malita) 2014/03/03 22:46:21 Looks like we can consolidate these three bools +
Stephen Chennney 2014/03/04 13:20:36 I missed the odd one at the bottom. So yes.
Stephen Chennney 2014/03/04 14:47:10 Done.
GradientSpreadMethod m_spreadMethod;
AffineTransform m_gradientSpaceTransformation;

Powered by Google App Engine
This is Rietveld 408576698