| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 break; | 284 break; |
| 285 case AnnotationType::NAMED_DESTINATION: { | 285 case AnnotationType::NAMED_DESTINATION: { |
| 286 SkPoint point = SkPoint::Make(rect.x(), rect.y()); | 286 SkPoint point = SkPoint::Make(rect.x(), rect.y()); |
| 287 SkAnnotateNamedDestination(canvas_, point, data.get()); | 287 SkAnnotateNamedDestination(canvas_, point, data.get()); |
| 288 break; | 288 break; |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace cc | 293 } // namespace cc |
| OLD | NEW |