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

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

Issue 1290983003: SkImage-only bitmap patterns (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: drop non-repeat optimization Created 5 years, 4 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
Index: Source/platform/graphics/ImagePattern.h
diff --git a/Source/platform/graphics/ImagePattern.h b/Source/platform/graphics/ImagePattern.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3225af44833f0efc944fd065d34e723c576db61
--- /dev/null
+++ b/Source/platform/graphics/ImagePattern.h
@@ -0,0 +1,31 @@
+// 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 ImagePattern_h
+#define ImagePattern_h
+
+#include "platform/graphics/Pattern.h"
+
+class SkImage;
+
+namespace blink {
+
+class Image;
+
+class PLATFORM_EXPORT ImagePattern final : public Pattern {
+public:
+ static PassRefPtr<ImagePattern> create(PassRefPtr<Image>, RepeatMode);
+
+protected:
+ PassRefPtr<SkShader> createShader() override;
+
+private:
+ ImagePattern(PassRefPtr<Image>, RepeatMode);
+
+ RefPtr<SkImage> m_tileImage;
+};
+
+} // namespace
+
+#endif /* ImagePattern_h */

Powered by Google App Engine
This is Rietveld 408576698