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

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

Issue 453653003: [SVG] DisplayList-based patterns. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 9 tests marked for rebaseline Created 6 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/Pattern.h
diff --git a/Source/platform/graphics/Pattern.h b/Source/platform/graphics/Pattern.h
index c8010f6875eedbc9fc06f97d74c2842c08329ee6..a2ecdeb442ba914719685149b238a6564157b234 100644
--- a/Source/platform/graphics/Pattern.h
+++ b/Source/platform/graphics/Pattern.h
@@ -29,17 +29,21 @@
#ifndef Pattern_h
#define Pattern_h
-#include "SkShader.h"
#include "platform/PlatformExport.h"
-#include "platform/graphics/Image.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
+class SkShader;
+
namespace blink {
+class DisplayList;
+class Image;
+class NativeImageSkia;
+
class PLATFORM_EXPORT Pattern : public RefCounted<Pattern> {
public:
enum RepeatMode {
@@ -52,6 +56,8 @@ public:
static PassRefPtr<Pattern> createBitmapPattern(PassRefPtr<Image> tileImage,
RepeatMode = RepeatModeXY);
+ static PassRefPtr<Pattern> createDisplayListPattern(PassRefPtr<DisplayList>,
+ RepeatMode = RepeatModeXY);
~Pattern();
SkShader* shader();
@@ -60,8 +66,10 @@ public:
private:
Pattern(PassRefPtr<Image>, RepeatMode);
+ Pattern(PassRefPtr<DisplayList>, RepeatMode);
RefPtr<NativeImageSkia> m_tileImage;
+ RefPtr<DisplayList> m_tileDisplayList;
RepeatMode m_repeatMode;
AffineTransform m_patternSpaceTransformation;
RefPtr<SkShader> m_pattern;

Powered by Google App Engine
This is Rietveld 408576698