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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Pattern.h

Issue 1814473003: Revert of Add sk_sp helpers and switch Blink SkShader clients to the new APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
4 * Copyright (C) 2007-2008 Torch Mobile, Inc. 4 * Copyright (C) 2007-2008 Torch Mobile, Inc.
5 * Copyright (C) 2013 Google, Inc. All rights reserved. 5 * Copyright (C) 2013 Google, Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 enum RepeatMode { 49 enum RepeatMode {
50 RepeatModeX = 1 << 0, 50 RepeatModeX = 1 << 0,
51 RepeatModeY = 1 << 1, 51 RepeatModeY = 1 << 1,
52 52
53 RepeatModeNone = 0, 53 RepeatModeNone = 0,
54 RepeatModeXY = RepeatModeX | RepeatModeY 54 RepeatModeXY = RepeatModeX | RepeatModeY
55 }; 55 };
56 56
57 static PassRefPtr<Pattern> createImagePattern(PassRefPtr<Image>, RepeatMode = RepeatModeXY); 57 static PassRefPtr<Pattern> createImagePattern(PassRefPtr<Image>, RepeatMode = RepeatModeXY);
58 static PassRefPtr<Pattern> createPicturePattern(PassRefPtr<SkPicture>, 58 static PassRefPtr<Pattern> createPicturePattern(PassRefPtr<const SkPicture>,
59 RepeatMode = RepeatModeXY); 59 RepeatMode = RepeatModeXY);
60 virtual ~Pattern(); 60 virtual ~Pattern();
61 61
62 void applyToPaint(SkPaint&); 62 void applyToPaint(SkPaint&);
63 63
64 void setPatternSpaceTransform(const AffineTransform& patternSpaceTransformat ion); 64 void setPatternSpaceTransform(const AffineTransform& patternSpaceTransformat ion);
65 const AffineTransform& patternSpaceTransform() const { return m_patternSpace Transformation; } 65 const AffineTransform& patternSpaceTransform() const { return m_patternSpace Transformation; }
66 66
67 bool isRepeatX() { return m_repeatMode & RepeatModeX; } 67 bool isRepeatX() { return m_repeatMode & RepeatModeX; }
68 bool isRepeatY() { return m_repeatMode & RepeatModeY; } 68 bool isRepeatY() { return m_repeatMode & RepeatModeY; }
(...skipping 12 matching lines...) Expand all
81 Pattern(RepeatMode, int64_t externalMemoryAllocated = 0); 81 Pattern(RepeatMode, int64_t externalMemoryAllocated = 0);
82 82
83 private: 83 private:
84 RefPtr<SkShader> m_pattern; 84 RefPtr<SkShader> m_pattern;
85 int64_t m_externalMemoryAllocated; 85 int64_t m_externalMemoryAllocated;
86 }; 86 };
87 87
88 } // namespace blink 88 } // namespace blink
89 89
90 #endif 90 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ImagePattern.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