OLD | NEW |
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 #include "platform/graphics/PaintRecordPattern.h" | 5 #include "platform/graphics/PaintRecordPattern.h" |
6 | 6 |
7 #include "platform/graphics/paint/PaintFlags.h" | 7 #include "platform/graphics/paint/PaintFlags.h" |
8 #include "platform/graphics/paint/PaintRecord.h" | 8 #include "platform/graphics/paint/PaintRecord.h" |
9 #include "platform/graphics/paint/PaintShader.h" | 9 #include "platform/graphics/paint/PaintShader.h" |
10 #include "platform/graphics/skia/SkiaUtils.h" | 10 #include "platform/graphics/skia/SkiaUtils.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 tile_record_(std::move(record)), | 26 tile_record_(std::move(record)), |
27 tile_record_bounds_(record_bounds) { | 27 tile_record_bounds_(record_bounds) { |
28 // All current clients use RepeatModeXY, so we only support this mode for now. | 28 // All current clients use RepeatModeXY, so we only support this mode for now. |
29 DCHECK(IsRepeatXY()); | 29 DCHECK(IsRepeatXY()); |
30 | 30 |
31 // FIXME: we don't have a good way to account for DL memory utilization. | 31 // FIXME: we don't have a good way to account for DL memory utilization. |
32 } | 32 } |
33 | 33 |
34 PaintRecordPattern::~PaintRecordPattern() {} | 34 PaintRecordPattern::~PaintRecordPattern() {} |
35 | 35 |
36 sk_sp<PaintShader> PaintRecordPattern::CreateShader( | 36 std::unique_ptr<PaintShader> PaintRecordPattern::CreateShader( |
37 const SkMatrix& local_matrix) { | 37 const SkMatrix& local_matrix) { |
38 return MakePaintShaderRecord(tile_record_, tile_record_bounds_, | 38 return WTF::MakeUnique<PaintShader>( |
39 SkShader::kRepeat_TileMode, | 39 tile_record_, tile_record_bounds_, SkShader::kRepeat_TileMode, |
40 SkShader::kRepeat_TileMode, &local_matrix); | 40 SkShader::kRepeat_TileMode, &local_matrix); |
41 } | 41 } |
42 | 42 |
43 } // namespace blink | 43 } // namespace blink |
OLD | NEW |