Index: Source/platform/graphics/BitmapPatternBase.h |
diff --git a/Source/platform/graphics/BitmapPatternBase.h b/Source/platform/graphics/BitmapPatternBase.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..00d1bbf5c238fbe5af5a0551adee4826ecdd5a0a |
--- /dev/null |
+++ b/Source/platform/graphics/BitmapPatternBase.h |
@@ -0,0 +1,26 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BitmapPatternBase_h |
+#define BitmapPatternBase_h |
+ |
+#include "platform/graphics/Pattern.h" |
+ |
+namespace blink { |
+ |
+class PLATFORM_EXPORT BitmapPatternBase : public Pattern { |
+public: |
+ BitmapPatternBase(RepeatMode, int64_t externalMemoryAllocated = 0); |
+ virtual ~BitmapPatternBase(); |
+ |
+ virtual PassRefPtr<SkShader> createShader() OVERRIDE; |
+ |
+protected: |
+ virtual SkImageInfo getBitmapInfo() = 0; |
+ virtual void drawBitmapToCanvas(SkCanvas&, SkPaint&) = 0; |
+}; |
+ |
+} // namespace |
+ |
+#endif /* BitmapPatternBase_h */ |