| 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 #include "cc/paint/paint_canvas.h" | 5 #include "cc/paint/skia_paint_canvas.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/paint/display_item_list.h" | 8 #include "cc/paint/display_item_list.h" |
| 9 #include "cc/paint/paint_record.h" | 9 #include "cc/paint/paint_record.h" |
| 10 #include "cc/paint/paint_recorder.h" | 10 #include "cc/paint/paint_recorder.h" |
| 11 #include "third_party/skia/include/core/SkAnnotation.h" | 11 #include "third_party/skia/include/core/SkAnnotation.h" |
| 12 #include "third_party/skia/include/core/SkMetaData.h" | 12 #include "third_party/skia/include/core/SkMetaData.h" |
| 13 #include "third_party/skia/include/utils/SkNWayCanvas.h" | 13 #include "third_party/skia/include/utils/SkNWayCanvas.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 int SkiaPaintCanvas::save() { | 41 int SkiaPaintCanvas::save() { |
| 42 return canvas_->save(); | 42 return canvas_->save(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 int SkiaPaintCanvas::saveLayer(const SkRect* bounds, const PaintFlags* flags) { | 45 int SkiaPaintCanvas::saveLayer(const SkRect* bounds, const PaintFlags* flags) { |
| 46 return canvas_->saveLayer(bounds, ToSkPaint(flags)); | 46 return canvas_->saveLayer(bounds, ToSkPaint(flags)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 int SkiaPaintCanvas::saveLayerAlpha(const SkRect* bounds, U8CPU alpha) { | 49 int SkiaPaintCanvas::saveLayerAlpha(const SkRect* bounds, uint8_t alpha) { |
| 50 return canvas_->saveLayerAlpha(bounds, alpha); | 50 return canvas_->saveLayerAlpha(bounds, alpha); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void SkiaPaintCanvas::restore() { | 53 void SkiaPaintCanvas::restore() { |
| 54 canvas_->restore(); | 54 canvas_->restore(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 int SkiaPaintCanvas::getSaveCount() const { | 57 int SkiaPaintCanvas::getSaveCount() const { |
| 58 return canvas_->getSaveCount(); | 58 return canvas_->getSaveCount(); |
| 59 } | 59 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 break; | 271 break; |
| 272 case AnnotationType::NAMED_DESTINATION: { | 272 case AnnotationType::NAMED_DESTINATION: { |
| 273 SkPoint point = SkPoint::Make(rect.x(), rect.y()); | 273 SkPoint point = SkPoint::Make(rect.x(), rect.y()); |
| 274 SkAnnotateNamedDestination(canvas_, point, data.get()); | 274 SkAnnotateNamedDestination(canvas_, point, data.get()); |
| 275 break; | 275 break; |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace cc | 280 } // namespace cc |
| OLD | NEW |