| 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/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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 SkImageInfo SkiaPaintCanvas::imageInfo() const { | 33 SkImageInfo SkiaPaintCanvas::imageInfo() const { |
| 34 return canvas_->imageInfo(); | 34 return canvas_->imageInfo(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void SkiaPaintCanvas::flush() { | 37 void SkiaPaintCanvas::flush() { |
| 38 canvas_->flush(); | 38 canvas_->flush(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 SkISize SkiaPaintCanvas::getBaseLayerSize() const { | |
| 42 return canvas_->getBaseLayerSize(); | |
| 43 } | |
| 44 | |
| 45 bool SkiaPaintCanvas::writePixels(const SkImageInfo& info, | 41 bool SkiaPaintCanvas::writePixels(const SkImageInfo& info, |
| 46 const void* pixels, | 42 const void* pixels, |
| 47 size_t row_bytes, | 43 size_t row_bytes, |
| 48 int x, | 44 int x, |
| 49 int y) { | 45 int y) { |
| 50 return canvas_->writePixels(info, pixels, row_bytes, x, y); | 46 return canvas_->writePixels(info, pixels, row_bytes, x, y); |
| 51 } | 47 } |
| 52 | 48 |
| 53 int SkiaPaintCanvas::save() { | 49 int SkiaPaintCanvas::save() { |
| 54 return canvas_->save(); | 50 return canvas_->save(); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 break; | 292 break; |
| 297 case AnnotationType::NAMED_DESTINATION: { | 293 case AnnotationType::NAMED_DESTINATION: { |
| 298 SkPoint point = SkPoint::Make(rect.x(), rect.y()); | 294 SkPoint point = SkPoint::Make(rect.x(), rect.y()); |
| 299 SkAnnotateNamedDestination(canvas_, point, data.get()); | 295 SkAnnotateNamedDestination(canvas_, point, data.get()); |
| 300 break; | 296 break; |
| 301 } | 297 } |
| 302 } | 298 } |
| 303 } | 299 } |
| 304 | 300 |
| 305 } // namespace cc | 301 } // namespace cc |
| OLD | NEW |