Chromium Code Reviews| Index: Source/platform/graphics/ImagePattern.h |
| diff --git a/Source/platform/graphics/WindRule.h b/Source/platform/graphics/ImagePattern.h |
| similarity index 64% |
| copy from Source/platform/graphics/WindRule.h |
| copy to Source/platform/graphics/ImagePattern.h |
| index d4f123e813276baf5a09ce32d75c6c6637b060c9..ccbbdd39597be4056848981916067f1b563ba2f9 100644 |
| --- a/Source/platform/graphics/WindRule.h |
| +++ b/Source/platform/graphics/ImagePattern.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. |
|
Justin Novosad
2014/07/02 19:04:18
For new files use the license header in src/third_
Rémi Piotaix
2014/07/02 20:21:32
Done.
|
| */ |
| -#ifndef WindRule_h |
| -#define WindRule_h |
| +#ifndef ImagePattern_h |
| +#define ImagePattern_h |
| + |
| +#include "platform/graphics/Pattern.h" |
| namespace WebCore { |
| -enum WindRule { |
| - RULE_NONZERO = 0, |
| - RULE_EVENODD = 1 |
| -}; |
| +class PLATFORM_EXPORT ImagePattern : public Pattern { |
| +public: |
| + static PassRefPtr<Pattern> create(PassRefPtr<Image> tileImage, bool repeatX, bool repeatY) |
| + { |
| + return adoptRef(new ImagePattern(tileImage->image(), repeatX, repeatY)); |
| + } |
| + |
| + virtual ~ImagePattern() { } |
| -} |
| + virtual PassRefPtr<SkShader> createShader() OVERRIDE; |
| + |
| +private: |
| + ImagePattern(PassRefPtr<SkImage>, bool repeatX, bool repeatY); |
| + |
| + RefPtr<SkImage> m_tileImage; |
| +}; |
| -#endif // WindRule_h |
| +} // namespace |
| +#endif |