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

Side by Side Diff: cc/paint/paint_canvas.h

Issue 2758413002: cc/paint: Remove PaintCanvas::peekPixels. (Closed)
Patch Set: update Created 3 years, 9 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
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 #ifndef CC_PAINT_PAINT_CANVAS_H_ 5 #ifndef CC_PAINT_PAINT_CANVAS_H_
6 #define CC_PAINT_PAINT_CANVAS_H_ 6 #define CC_PAINT_PAINT_CANVAS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // TODO(enne): It would be nice to get rid of flush() entirely, as it 25 // TODO(enne): It would be nice to get rid of flush() entirely, as it
26 // doesn't really make sense for recording. However, this gets used by 26 // doesn't really make sense for recording. However, this gets used by
27 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both 27 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both
28 // software and hardware video. This is super entangled with ImageBuffer 28 // software and hardware video. This is super entangled with ImageBuffer
29 // and canvas/video painting in Blink where the same paths are used for 29 // and canvas/video painting in Blink where the same paths are used for
30 // both recording and gpu work. 30 // both recording and gpu work.
31 virtual void flush() = 0; 31 virtual void flush() = 0;
32 32
33 virtual SkISize getBaseLayerSize() const = 0; 33 virtual SkISize getBaseLayerSize() const = 0;
34 virtual bool peekPixels(SkPixmap* pixmap) = 0;
35 virtual bool readPixels(const SkImageInfo& dest_info, 34 virtual bool readPixels(const SkImageInfo& dest_info,
36 void* dest_pixels, 35 void* dest_pixels,
37 size_t dest_row_bytes, 36 size_t dest_row_bytes,
38 int src_x, 37 int src_x,
39 int src_y) = 0; 38 int src_y) = 0;
40 virtual bool readPixels(SkBitmap* bitmap, int src_x, int src_y) = 0; 39 virtual bool readPixels(SkBitmap* bitmap, int src_x, int src_y) = 0;
41 virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) = 0; 40 virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) = 0;
42 virtual bool writePixels(const SkImageInfo& info, 41 virtual bool writePixels(const SkImageInfo& info,
43 const void* pixels, 42 const void* pixels,
44 size_t row_bytes, 43 size_t row_bytes,
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 const SkPoint& point, 262 const SkPoint& point,
264 SkData* data); 263 SkData* data);
265 264
266 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, 265 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas,
267 const SkRect& rect, 266 const SkRect& rect,
268 SkData* data); 267 SkData* data);
269 268
270 } // namespace cc 269 } // namespace cc
271 270
272 #endif // CC_PAINT_PAINT_CANVAS_H_ 271 #endif // CC_PAINT_PAINT_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698