Index: Source/platform/graphics/BitmapPattern.h |
diff --git a/Source/platform/graphics/WindRule.h b/Source/platform/graphics/BitmapPattern.h |
similarity index 64% |
copy from Source/platform/graphics/WindRule.h |
copy to Source/platform/graphics/BitmapPattern.h |
index d4f123e813276baf5a09ce32d75c6c6637b060c9..628028191def645d89454a833352382823e49caf 100644 |
--- a/Source/platform/graphics/WindRule.h |
+++ b/Source/platform/graphics/BitmapPattern.h |
@@ -1,7 +1,8 @@ |
/* |
- * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. |
- * 2006 Rob Buis <buis@kde.org> |
+ * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. |
+ * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
* Copyright (C) 2007-2008 Torch Mobile, Inc. |
+ * Copyright (C) 2013 Google, Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -25,17 +26,30 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WindRule_h |
-#define WindRule_h |
+#ifndef BitmapPattern_h |
+#define BitmapPattern_h |
+ |
+#include "platform/graphics/Pattern.h" |
namespace WebCore { |
-enum WindRule { |
- RULE_NONZERO = 0, |
- RULE_EVENODD = 1 |
-}; |
+class PLATFORM_EXPORT BitmapPattern : public Pattern { |
+public: |
+ static PassRefPtr<Pattern> create(PassRefPtr<Image> tileImage, bool repeatX, bool repeatY) |
+ { |
+ return adoptRef(new BitmapPattern(tileImage, repeatX, repeatY)); |
+ } |
+ |
+ virtual ~BitmapPattern() { } |
-} |
+ virtual PassRefPtr<SkShader> createShader() OVERRIDE; |
+ |
+private: |
+ BitmapPattern(PassRefPtr<Image>, bool repeatX, bool repeatY); |
+ |
+ RefPtr<NativeImageSkia> m_tileImage; |
+}; |
-#endif // WindRule_h |
+} // namespace |
+#endif |