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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 11 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: third_party/WebKit/Source/platform/graphics/Pattern.h
diff --git a/third_party/WebKit/Source/platform/graphics/Pattern.h b/third_party/WebKit/Source/platform/graphics/Pattern.h
index 71bb8dcf4c14688062433dc178a82705608ede8c..5e0e5e5166e0c376f655f0edd60845081a2837f5 100644
--- a/third_party/WebKit/Source/platform/graphics/Pattern.h
+++ b/third_party/WebKit/Source/platform/graphics/Pattern.h
@@ -31,6 +31,8 @@
#include "platform/PlatformExport.h"
#include "platform/graphics/Image.h"
+#include "platform/graphics/paint/PaintRecord.h"
+#include "platform/graphics/paint/PaintShader.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "wtf/Noncopyable.h"
@@ -38,8 +40,6 @@
#include "wtf/RefCounted.h"
class SkMatrix;
-class SkPaint;
-class SkPicture;
namespace blink {
@@ -57,11 +57,11 @@ class PLATFORM_EXPORT Pattern : public RefCounted<Pattern> {
static PassRefPtr<Pattern> createImagePattern(PassRefPtr<Image>,
RepeatMode = RepeatModeXY);
- static PassRefPtr<Pattern> createPicturePattern(sk_sp<SkPicture>,
+ static PassRefPtr<Pattern> createPicturePattern(sk_sp<PaintRecord>,
RepeatMode = RepeatModeXY);
virtual ~Pattern();
- void applyToPaint(SkPaint&, const SkMatrix&);
+ void applyToPaint(PaintFlags&, const SkMatrix&);
bool isRepeatX() const { return m_repeatMode & RepeatModeX; }
bool isRepeatY() const { return m_repeatMode & RepeatModeY; }
@@ -70,7 +70,7 @@ class PLATFORM_EXPORT Pattern : public RefCounted<Pattern> {
virtual bool isTextureBacked() const { return false; }
protected:
- virtual sk_sp<SkShader> createShader(const SkMatrix&) = 0;
+ virtual sk_sp<PaintShader> createShader(const SkMatrix&) = 0;
virtual bool isLocalMatrixChanged(const SkMatrix&) const;
void adjustExternalMemoryAllocated(int64_t delta);
@@ -78,7 +78,7 @@ class PLATFORM_EXPORT Pattern : public RefCounted<Pattern> {
RepeatMode m_repeatMode;
Pattern(RepeatMode, int64_t externalMemoryAllocated = 0);
- mutable sk_sp<SkShader> m_cachedShader;
+ mutable sk_sp<PaintShader> m_cachedShader;
private:
int64_t m_externalMemoryAllocated;
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Path.cpp ('k') | third_party/WebKit/Source/platform/graphics/Pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698