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

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

Issue 2893083002: cc: Move SkShader construction to a single spot in PaintShader (Closed)
Patch Set: update Created 3 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ImagePattern_h 5 #ifndef ImagePattern_h
6 #define ImagePattern_h 6 #define ImagePattern_h
7 7
8 #include "platform/graphics/Pattern.h" 8 #include "platform/graphics/Pattern.h"
9 9
10 class SkImage; 10 class SkImage;
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class Image; 14 class Image;
15 15
16 class PLATFORM_EXPORT ImagePattern final : public Pattern { 16 class PLATFORM_EXPORT ImagePattern final : public Pattern {
17 public: 17 public:
18 static PassRefPtr<ImagePattern> Create(PassRefPtr<Image>, RepeatMode); 18 static PassRefPtr<ImagePattern> Create(PassRefPtr<Image>, RepeatMode);
19 19
20 bool IsTextureBacked() const override; 20 bool IsTextureBacked() const override;
21 21
22 protected: 22 protected:
23 sk_sp<PaintShader> CreateShader(const SkMatrix&) override; 23 std::unique_ptr<PaintShader> CreateShader(const SkMatrix&) override;
24 bool IsLocalMatrixChanged(const SkMatrix&) const override; 24 bool IsLocalMatrixChanged(const SkMatrix&) const override;
25 25
26 private: 26 private:
27 ImagePattern(PassRefPtr<Image>, RepeatMode); 27 ImagePattern(PassRefPtr<Image>, RepeatMode);
28 SkMatrix previous_local_matrix_; 28 SkMatrix previous_local_matrix_;
29 29
30 sk_sp<SkImage> tile_image_; 30 sk_sp<SkImage> tile_image_;
31 }; 31 };
32 32
33 } // namespace blink 33 } // namespace blink
34 34
35 #endif /* ImagePattern_h */ 35 #endif /* ImagePattern_h */
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.cpp ('k') | third_party/WebKit/Source/platform/graphics/ImagePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698