| 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/skia_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_recorder.h" | 9 #include "cc/paint/paint_recorder.h" |
| 10 #include "third_party/skia/include/core/SkAnnotation.h" | 10 #include "third_party/skia/include/core/SkAnnotation.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 void SkiaPaintCanvas::drawTextBlob(sk_sp<SkTextBlob> blob, | 228 void SkiaPaintCanvas::drawTextBlob(sk_sp<SkTextBlob> blob, |
| 229 SkScalar x, | 229 SkScalar x, |
| 230 SkScalar y, | 230 SkScalar y, |
| 231 const PaintFlags& flags) { | 231 const PaintFlags& flags) { |
| 232 canvas_->drawTextBlob(blob.get(), x, y, ToSkPaint(flags)); | 232 canvas_->drawTextBlob(blob.get(), x, y, ToSkPaint(flags)); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void SkiaPaintCanvas::drawDisplayItemList( | 235 void SkiaPaintCanvas::drawDisplayItemList( |
| 236 scoped_refptr<DisplayItemList> display_item_list) { | 236 scoped_refptr<DisplayItemList> display_item_list) { |
| 237 display_item_list->Raster(canvas_, nullptr); | 237 display_item_list->Raster(canvas_); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void SkiaPaintCanvas::drawPicture(sk_sp<const PaintRecord> record) { | 240 void SkiaPaintCanvas::drawPicture(sk_sp<const PaintRecord> record) { |
| 241 record->playback(canvas_); | 241 record->playback(canvas_); |
| 242 } | 242 } |
| 243 | 243 |
| 244 bool SkiaPaintCanvas::isClipEmpty() const { | 244 bool SkiaPaintCanvas::isClipEmpty() const { |
| 245 return canvas_->isClipEmpty(); | 245 return canvas_->isClipEmpty(); |
| 246 } | 246 } |
| 247 | 247 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 265 break; | 265 break; |
| 266 case AnnotationType::NAMED_DESTINATION: { | 266 case AnnotationType::NAMED_DESTINATION: { |
| 267 SkPoint point = SkPoint::Make(rect.x(), rect.y()); | 267 SkPoint point = SkPoint::Make(rect.x(), rect.y()); |
| 268 SkAnnotateNamedDestination(canvas_, point, data.get()); | 268 SkAnnotateNamedDestination(canvas_, point, data.get()); |
| 269 break; | 269 break; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace cc | 274 } // namespace cc |
| OLD | NEW |