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

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

Issue 358893002: Use newImageSnapshot() to get an image from a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrections Created 6 years, 3 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/BitmapPattern.cpp ('k') | Source/platform/graphics/BitmapPatternBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 */
« no previous file with comments | « Source/platform/graphics/BitmapPattern.cpp ('k') | Source/platform/graphics/BitmapPatternBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698