| Index: third_party/WebKit/Source/platform/graphics/Gradient.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.h b/third_party/WebKit/Source/platform/graphics/Gradient.h
|
| index 0b024d933687ceda6a650646070a41e4ef4f6963..7cded6b63e1ed158d43f4afea7d244a1e2b674e1 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Gradient.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/Gradient.h
|
| @@ -33,13 +33,13 @@
|
| #include "platform/geometry/FloatPoint.h"
|
| #include "platform/graphics/Color.h"
|
| #include "platform/graphics/GraphicsTypes.h"
|
| -#include "platform/transforms/AffineTransform.h"
|
| #include "third_party/skia/include/core/SkRefCnt.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/Vector.h"
|
|
|
| +class SkMatrix;
|
| class SkPaint;
|
| class SkShader;
|
|
|
| @@ -109,22 +109,18 @@ public:
|
| m_r1 = r;
|
| }
|
|
|
| - float aspectRatio() const { return m_aspectRatio; }
|
| -
|
| - void applyToPaint(SkPaint&);
|
| + void applyToPaint(SkPaint&, const SkMatrix& localMatrix);
|
|
|
| void setDrawsInPMColorSpace(bool drawInPMColorSpace);
|
|
|
| void setSpreadMethod(GradientSpreadMethod);
|
| GradientSpreadMethod spreadMethod() const { return m_spreadMethod; }
|
| - void setGradientSpaceTransform(const AffineTransform& gradientSpaceTransformation);
|
| - AffineTransform gradientSpaceTransform() { return m_gradientSpaceTransformation; }
|
|
|
| private:
|
| Gradient(const FloatPoint& p0, const FloatPoint& p1);
|
| Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio);
|
|
|
| - sk_sp<SkShader> createShader();
|
| + sk_sp<SkShader> createShader(const SkMatrix& localMatrix);
|
|
|
| void sortStopsIfNecessary();
|
|
|
| @@ -138,9 +134,8 @@ private:
|
| bool m_stopsSorted;
|
| bool m_drawInPMColorSpace;
|
| GradientSpreadMethod m_spreadMethod;
|
| - AffineTransform m_gradientSpaceTransformation;
|
|
|
| - sk_sp<SkShader> m_gradient;
|
| + mutable sk_sp<SkShader> m_cachedShader;
|
| };
|
|
|
| } // namespace blink
|
|
|