Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: cc/paint/skia_paint_canvas.cc

Issue 2792133002: Paint: remove readPixels. (Closed)
Patch Set: update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/paint/skia_paint_canvas.h ('k') | media/renderers/skcanvas_video_renderer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
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 { 41 SkISize SkiaPaintCanvas::getBaseLayerSize() const {
42 return canvas_->getBaseLayerSize(); 42 return canvas_->getBaseLayerSize();
43 } 43 }
44 44
45 bool SkiaPaintCanvas::readPixels(const SkImageInfo& dest_info,
46 void* dest_pixels,
47 size_t dest_row_bytes,
48 int src_x,
49 int src_y) {
50 return canvas_->readPixels(dest_info, dest_pixels, dest_row_bytes, src_x,
51 src_y);
52 }
53
54 bool SkiaPaintCanvas::readPixels(SkBitmap* bitmap, int src_x, int src_y) {
55 return canvas_->readPixels(bitmap, src_x, src_y);
56 }
57
58 bool SkiaPaintCanvas::readPixels(const SkIRect& srcRect, SkBitmap* bitmap) {
59 return canvas_->readPixels(srcRect, bitmap);
60 }
61
62 bool SkiaPaintCanvas::writePixels(const SkImageInfo& info, 45 bool SkiaPaintCanvas::writePixels(const SkImageInfo& info,
63 const void* pixels, 46 const void* pixels,
64 size_t row_bytes, 47 size_t row_bytes,
65 int x, 48 int x,
66 int y) { 49 int y) {
67 return canvas_->writePixels(info, pixels, row_bytes, x, y); 50 return canvas_->writePixels(info, pixels, row_bytes, x, y);
68 } 51 }
69 52
70 int SkiaPaintCanvas::save() { 53 int SkiaPaintCanvas::save() {
71 return canvas_->save(); 54 return canvas_->save();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 break; 302 break;
320 case AnnotationType::NAMED_DESTINATION: { 303 case AnnotationType::NAMED_DESTINATION: {
321 SkPoint point = SkPoint::Make(rect.x(), rect.y()); 304 SkPoint point = SkPoint::Make(rect.x(), rect.y());
322 SkAnnotateNamedDestination(canvas_, point, data.get()); 305 SkAnnotateNamedDestination(canvas_, point, data.get());
323 break; 306 break;
324 } 307 }
325 } 308 }
326 } 309 }
327 310
328 } // namespace cc 311 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/skia_paint_canvas.h ('k') | media/renderers/skcanvas_video_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698