| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "cdl_paint.h" |
| 9 |
| 10 #if CDL_ENABLED |
| 11 |
| 12 #include <cstdlib> |
| 13 |
| 14 #include "base/logging.h" |
| 15 #include "cdl_shader.h" |
| 16 |
| 17 CdlPaint::CdlPaint() {} |
| 18 CdlPaint::~CdlPaint() {} |
| 19 |
| 20 CdlPaint::CdlPaint(const CdlPaint& paint) |
| 21 : paint_(paint.paint_), shader_(paint.shader_) {} |
| 22 |
| 23 SkPaint CdlPaint::toSkPaint() const { |
| 24 SkPaint paint = paint_; |
| 25 if (shader_.get()) |
| 26 paint.setShader(shader_->createSkShader()); |
| 27 return paint; |
| 28 } |
| 29 |
| 30 #endif // CDL_ENABLED |
| OLD | NEW |