| Index: Source/platform/graphics/Pattern.h
|
| diff --git a/Source/platform/graphics/Pattern.h b/Source/platform/graphics/Pattern.h
|
| index 49fd69f8671160aec150c09d391aecfdf876f3f1..8d21b53273f0830875fb48b96496d3078ed4711b 100644
|
| --- a/Source/platform/graphics/Pattern.h
|
| +++ b/Source/platform/graphics/Pattern.h
|
| @@ -29,7 +29,6 @@
|
| #ifndef Pattern_h
|
| #define Pattern_h
|
|
|
| -#include "SkShader.h"
|
| #include "platform/PlatformExport.h"
|
| #include "platform/graphics/Image.h"
|
| #include "platform/transforms/AffineTransform.h"
|
| @@ -38,6 +37,8 @@
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/RefPtr.h"
|
|
|
| +class SkShader;
|
| +
|
| namespace blink {
|
|
|
| class PLATFORM_EXPORT Pattern : public RefCounted<Pattern> {
|
| @@ -52,20 +53,29 @@ public:
|
|
|
| static PassRefPtr<Pattern> createBitmapPattern(PassRefPtr<Image> tileImage,
|
| RepeatMode = RepeatModeXY);
|
| - ~Pattern();
|
| + virtual ~Pattern();
|
|
|
| SkShader* shader();
|
|
|
| void setPatternSpaceTransform(const AffineTransform& patternSpaceTransformation);
|
|
|
| -private:
|
| - Pattern(PassRefPtr<Image>, RepeatMode);
|
| + bool isRepeatX() { return m_repeatMode & RepeatModeX; }
|
| + bool isRepeatY() { return m_repeatMode & RepeatModeY; }
|
| + bool isRepeatXY() { return m_repeatMode == RepeatModeXY; }
|
| +
|
| +protected:
|
| + virtual PassRefPtr<SkShader> createShader() = 0;
|
| +
|
| + void adjustExternalMemoryAllocated(int64_t delta);
|
|
|
| - RefPtr<NativeImageSkia> m_tileImage;
|
| RepeatMode m_repeatMode;
|
| AffineTransform m_patternSpaceTransformation;
|
| +
|
| + Pattern(RepeatMode, int64_t externalMemoryAllocated = 0);
|
| +
|
| +private:
|
| RefPtr<SkShader> m_pattern;
|
| - int m_externalMemoryAllocated;
|
| + int64_t m_externalMemoryAllocated;
|
| };
|
|
|
| } // namespace blink
|
|
|