| Index: third_party/WebKit/Source/platform/graphics/Pattern.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Pattern.h b/third_party/WebKit/Source/platform/graphics/Pattern.h
|
| index d9736e2565b981aa69a6525bd03102e194bd9b6d..667fc94d6dd7f6bfdbbc933b0109c72717335e1c 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Pattern.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/Pattern.h
|
| @@ -31,13 +31,13 @@
|
|
|
| #include "platform/PlatformExport.h"
|
| #include "platform/graphics/Image.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"
|
|
|
| +class SkMatrix;
|
| class SkPaint;
|
| class SkPicture;
|
|
|
| @@ -59,10 +59,7 @@ public:
|
| RepeatMode = RepeatModeXY);
|
| virtual ~Pattern();
|
|
|
| - void applyToPaint(SkPaint&);
|
| -
|
| - void setPatternSpaceTransform(const AffineTransform& patternSpaceTransformation);
|
| - const AffineTransform& patternSpaceTransform() const { return m_patternSpaceTransformation; }
|
| + void applyToPaint(SkPaint&, const SkMatrix&) const;
|
|
|
| bool isRepeatX() const { return m_repeatMode & RepeatModeX; }
|
| bool isRepeatY() const { return m_repeatMode & RepeatModeY; }
|
| @@ -71,17 +68,16 @@ public:
|
| virtual bool isTextureBacked() const { return false; }
|
|
|
| protected:
|
| - virtual sk_sp<SkShader> createShader() const = 0;
|
| + virtual sk_sp<SkShader> createShader(const SkMatrix&) const = 0;
|
|
|
| void adjustExternalMemoryAllocated(int64_t delta);
|
|
|
| RepeatMode m_repeatMode;
|
| - AffineTransform m_patternSpaceTransformation;
|
|
|
| Pattern(RepeatMode, int64_t externalMemoryAllocated = 0);
|
|
|
| private:
|
| - sk_sp<SkShader> m_pattern;
|
| + mutable sk_sp<SkShader> m_cachedShader;
|
| int64_t m_externalMemoryAllocated;
|
| };
|
|
|
|
|