| 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 10 matching lines...) Expand all Loading... |
| 21 RepeatMode mode) | 21 RepeatMode mode) |
| 22 : Pattern(mode), tile_record_(std::move(record)) { | 22 : Pattern(mode), tile_record_(std::move(record)) { |
| 23 // All current clients use RepeatModeXY, so we only support this mode for now. | 23 // All current clients use RepeatModeXY, so we only support this mode for now. |
| 24 DCHECK(IsRepeatXY()); | 24 DCHECK(IsRepeatXY()); |
| 25 | 25 |
| 26 // FIXME: we don't have a good way to account for DL memory utilization. | 26 // FIXME: we don't have a good way to account for DL memory utilization. |
| 27 } | 27 } |
| 28 | 28 |
| 29 PaintRecordPattern::~PaintRecordPattern() {} | 29 PaintRecordPattern::~PaintRecordPattern() {} |
| 30 | 30 |
| 31 sk_sp<PaintShader> PaintRecordPattern::CreateShader( | 31 std::unique_ptr<PaintShader> PaintRecordPattern::CreateShader( |
| 32 const SkMatrix& local_matrix) { | 32 const SkMatrix& local_matrix) { |
| 33 SkRect tile_bounds = tile_record_->cullRect(); | 33 SkRect tile_bounds = tile_record_->cullRect(); |
| 34 | 34 |
| 35 return MakePaintShaderRecord(tile_record_, SkShader::kRepeat_TileMode, | 35 return WTF::MakeUnique<PaintShader>(tile_record_, SkShader::kRepeat_TileMode, |
| 36 SkShader::kRepeat_TileMode, &local_matrix, | 36 SkShader::kRepeat_TileMode, &local_matrix, |
| 37 &tile_bounds); | 37 &tile_bounds); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace blink | 40 } // namespace blink |
| OLD | NEW |