| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 int SkiaPaintCanvas::save() { | 70 int SkiaPaintCanvas::save() { |
| 71 return canvas_->save(); | 71 return canvas_->save(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 int SkiaPaintCanvas::saveLayer(const SkRect* bounds, const PaintFlags* flags) { | 74 int SkiaPaintCanvas::saveLayer(const SkRect* bounds, const PaintFlags* flags) { |
| 75 return canvas_->saveLayer(bounds, ToSkPaint(flags)); | 75 return canvas_->saveLayer(bounds, ToSkPaint(flags)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 int SkiaPaintCanvas::saveLayerAlpha(const SkRect* bounds, U8CPU alpha) { | 78 int SkiaPaintCanvas::saveLayerAlpha(const SkRect* bounds, uint8_t alpha) { |
| 79 return canvas_->saveLayerAlpha(bounds, alpha); | 79 return canvas_->saveLayerAlpha(bounds, alpha); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void SkiaPaintCanvas::restore() { | 82 void SkiaPaintCanvas::restore() { |
| 83 canvas_->restore(); | 83 canvas_->restore(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 int SkiaPaintCanvas::getSaveCount() const { | 86 int SkiaPaintCanvas::getSaveCount() const { |
| 87 return canvas_->getSaveCount(); | 87 return canvas_->getSaveCount(); |
| 88 } | 88 } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 break; | 319 break; |
| 320 case AnnotationType::NAMED_DESTINATION: { | 320 case AnnotationType::NAMED_DESTINATION: { |
| 321 SkPoint point = SkPoint::Make(rect.x(), rect.y()); | 321 SkPoint point = SkPoint::Make(rect.x(), rect.y()); |
| 322 SkAnnotateNamedDestination(canvas_, point, data.get()); | 322 SkAnnotateNamedDestination(canvas_, point, data.get()); |
| 323 break; | 323 break; |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 } // namespace cc | 328 } // namespace cc |
| OLD | NEW |