| 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/paint_record.h" | 8 #include "cc/paint/paint_record.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 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 void SkiaPaintCanvas::flush() { | 35 void SkiaPaintCanvas::flush() { |
| 36 canvas_->flush(); | 36 canvas_->flush(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 SkISize SkiaPaintCanvas::getBaseLayerSize() const { | 39 SkISize SkiaPaintCanvas::getBaseLayerSize() const { |
| 40 return canvas_->getBaseLayerSize(); | 40 return canvas_->getBaseLayerSize(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool SkiaPaintCanvas::peekPixels(SkPixmap* pixmap) { | |
| 44 return canvas_->peekPixels(pixmap); | |
| 45 } | |
| 46 | |
| 47 bool SkiaPaintCanvas::readPixels(const SkImageInfo& dest_info, | 43 bool SkiaPaintCanvas::readPixels(const SkImageInfo& dest_info, |
| 48 void* dest_pixels, | 44 void* dest_pixels, |
| 49 size_t dest_row_bytes, | 45 size_t dest_row_bytes, |
| 50 int src_x, | 46 int src_x, |
| 51 int src_y) { | 47 int src_y) { |
| 52 return canvas_->readPixels(dest_info, dest_pixels, dest_row_bytes, src_x, | 48 return canvas_->readPixels(dest_info, dest_pixels, dest_row_bytes, src_x, |
| 53 src_y); | 49 src_y); |
| 54 } | 50 } |
| 55 | 51 |
| 56 bool SkiaPaintCanvas::readPixels(SkBitmap* bitmap, int src_x, int src_y) { | 52 bool SkiaPaintCanvas::readPixels(SkBitmap* bitmap, int src_x, int src_y) { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 SkData* data) { | 336 SkData* data) { |
| 341 SkAnnotateNamedDestination(canvas_, point, data); | 337 SkAnnotateNamedDestination(canvas_, point, data); |
| 342 } | 338 } |
| 343 | 339 |
| 344 void SkiaPaintCanvas::AnnotateLinkToDestination(const SkRect& rect, | 340 void SkiaPaintCanvas::AnnotateLinkToDestination(const SkRect& rect, |
| 345 SkData* data) { | 341 SkData* data) { |
| 346 SkAnnotateLinkToDestination(canvas_, rect, data); | 342 SkAnnotateLinkToDestination(canvas_, rect, data); |
| 347 } | 343 } |
| 348 | 344 |
| 349 } // namespace cc | 345 } // namespace cc |
| OLD | NEW |