| OLD | NEW |
| 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 "cc/paint/paint_export.h" | |
| 9 #include "cc/paint/paint_op_buffer.h" | |
| 10 #include "third_party/skia/include/core/SkPicture.h" | 8 #include "third_party/skia/include/core/SkPicture.h" |
| 11 | 9 |
| 12 namespace cc { | 10 namespace cc { |
| 13 | 11 |
| 14 // TODO(enne): Don't want to rename the world for this. Using these as the | 12 using PaintRecord = SkPicture; |
| 15 // same types for now prevents an extra allocation. Probably PaintRecord | |
| 16 // will become an interface in the future. | |
| 17 using PaintRecord = PaintOpBuffer; | |
| 18 | 13 |
| 19 // TODO(enne): Remove these if possible, they are really expensive. | 14 inline sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record) { |
| 20 CC_PAINT_EXPORT sk_sp<SkPicture> ToSkPicture(sk_sp<PaintRecord> record); | 15 return record; |
| 16 } |
| 21 | 17 |
| 22 CC_PAINT_EXPORT sk_sp<const SkPicture> ToSkPicture( | 18 inline sk_sp<const SkPicture> ToSkPicture(sk_sp<const PaintRecord> record) { |
| 23 sk_sp<const PaintRecord> record); | 19 return record; |
| 20 } |
| 24 | 21 |
| 25 } // namespace cc | 22 } // namespace cc |
| 26 | 23 |
| 27 #endif // CC_PAINT_PAINT_RECORD_H_ | 24 #endif // CC_PAINT_PAINT_RECORD_H_ |
| OLD | NEW |