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

Side by Side Diff: cc/paint/paint_record.h

Issue 2769533002: Clean up calls to ToSkPicture (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « cc/paint/paint_canvas.h ('k') | cc/paint/skia_paint_canvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 CC_PAINT_PAINT_RECORD_H_ 5 #ifndef CC_PAINT_PAINT_RECORD_H_
6 #define CC_PAINT_PAINT_RECORD_H_ 6 #define CC_PAINT_PAINT_RECORD_H_
7 7
8 #include "third_party/skia/include/core/SkPicture.h" 8 #include "third_party/skia/include/core/SkPicture.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 using PaintRecord = SkPicture; 12 using PaintRecord = SkPicture;
13 13
14 inline const SkPicture* ToSkPicture(const PaintRecord* record) {
15 return record;
16 }
17
18 inline SkPicture* ToSkPicture(PaintRecord* record) {
19 return record;
20 }
21
22 inline sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) { 14 inline sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) {
23 return record; 15 return record;
24 } 16 }
25 17
26 inline sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record) { 18 inline sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record) {
27 return record; 19 return record;
28 } 20 }
29 21
30 } // namespace cc 22 } // namespace cc
31 23
32 #endif // CC_PAINT_PAINT_RECORD_H_ 24 #endif // CC_PAINT_PAINT_RECORD_H_
OLDNEW
« no previous file with comments | « cc/paint/paint_canvas.h ('k') | cc/paint/skia_paint_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698