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

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

Issue 2893083002: cc: Move SkShader construction to a single spot in PaintShader (Closed)
Patch Set: update Created 3 years, 7 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 PaintRecordPattern_h 5 #ifndef PaintRecordPattern_h
6 #define PaintRecordPattern_h 6 #define PaintRecordPattern_h
7 7
8 #include "platform/graphics/Pattern.h" 8 #include "platform/graphics/Pattern.h"
9 #include "third_party/skia/include/core/SkRefCnt.h" 9 #include "third_party/skia/include/core/SkRefCnt.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // TODO(enne): rename this 13 // TODO(enne): rename this
14 class PLATFORM_EXPORT PaintRecordPattern final : public Pattern { 14 class PLATFORM_EXPORT PaintRecordPattern final : public Pattern {
15 public: 15 public:
16 static PassRefPtr<PaintRecordPattern> Create(sk_sp<PaintRecord>, RepeatMode); 16 static PassRefPtr<PaintRecordPattern> Create(sk_sp<PaintRecord>, RepeatMode);
17 17
18 ~PaintRecordPattern() override; 18 ~PaintRecordPattern() override;
19 19
20 protected: 20 protected:
21 sk_sp<PaintShader> CreateShader(const SkMatrix&) override; 21 std::unique_ptr<PaintShader> CreateShader(const SkMatrix&) override;
22 22
23 private: 23 private:
24 PaintRecordPattern(sk_sp<PaintRecord>, RepeatMode); 24 PaintRecordPattern(sk_sp<PaintRecord>, RepeatMode);
25 25
26 sk_sp<PaintRecord> tile_record_; 26 sk_sp<PaintRecord> tile_record_;
27 }; 27 };
28 28
29 } // namespace blink 29 } // namespace blink
30 30
31 #endif 31 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698