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

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

Issue 169283008: Maintain SkPaint in GraphicsContextState. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: A couple more optimizations. 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
« no previous file with comments | « Source/platform/graphics/CrossfadeGeneratedImage.cpp ('k') | Source/platform/graphics/Gradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Gradient.h
diff --git a/Source/platform/graphics/Gradient.h b/Source/platform/graphics/Gradient.h
index 0fa5814555fb552985449762c87e04871aacad40..697f8fb0261c96acfb177229cd81325f851e23c1 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_gradient; }
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,19 +136,18 @@ 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_drawInPMColorSpace;
GradientSpreadMethod m_spreadMethod;
AffineTransform m_gradientSpaceTransformation;
- bool m_drawInPMColorSpace;
RefPtr<SkShader> m_gradient;
};
« no previous file with comments | « Source/platform/graphics/CrossfadeGeneratedImage.cpp ('k') | Source/platform/graphics/Gradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698