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

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

Issue 2690583002: Make cc/paint have concrete types (Closed)
Patch Set: PaintRecord as typedef, fixup playback calls 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_recorder.cc ('k') | cc/paint/paint_surface.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_SHADER_H_ 5 #ifndef CC_PAINT_PAINT_SHADER_H_
6 #define CC_PAINT_PAINT_SHADER_H_ 6 #define CC_PAINT_PAINT_SHADER_H_
7 7
8 #include "cc/paint/paint_record.h" 8 #include "cc/paint/paint_record.h"
9 #include "third_party/skia/include/core/SkImage.h" 9 #include "third_party/skia/include/core/SkImage.h"
10 #include "third_party/skia/include/core/SkShader.h" 10 #include "third_party/skia/include/core/SkShader.h"
(...skipping 17 matching lines...) Expand all
28 SkShader::TileMode ty, 28 SkShader::TileMode ty,
29 const SkMatrix* local_matrix) { 29 const SkMatrix* local_matrix) {
30 return image->makeShader(tx, ty, local_matrix); 30 return image->makeShader(tx, ty, local_matrix);
31 } 31 }
32 32
33 inline sk_sp<PaintShader> MakePaintShaderRecord(sk_sp<PaintRecord> record, 33 inline sk_sp<PaintShader> MakePaintShaderRecord(sk_sp<PaintRecord> record,
34 SkShader::TileMode tx, 34 SkShader::TileMode tx,
35 SkShader::TileMode ty, 35 SkShader::TileMode ty,
36 const SkMatrix* local_matrix, 36 const SkMatrix* local_matrix,
37 const SkRect* tile) { 37 const SkRect* tile) {
38 return SkShader::MakePictureShader(record, tx, ty, local_matrix, tile); 38 return SkShader::MakePictureShader(ToSkPicture(record), tx, ty, local_matrix,
39 tile);
39 } 40 }
40 41
41 } // namespace cc 42 } // namespace cc
42 43
43 #endif // CC_PAINT_PAINT_SHADER_H_ 44 #endif // CC_PAINT_PAINT_SHADER_H_
OLDNEW
« no previous file with comments | « cc/paint/paint_recorder.cc ('k') | cc/paint/paint_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698