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 #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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // TODO(enne): It would be nice to get rid of flush() entirely, as it | 24 // TODO(enne): It would be nice to get rid of flush() entirely, as it |
25 // doesn't really make sense for recording. However, this gets used by | 25 // doesn't really make sense for recording. However, this gets used by |
26 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both | 26 // SkCanvasVideoRenderer which takes a PaintCanvas to paint both |
27 // software and hardware video. This is super entangled with ImageBuffer | 27 // software and hardware video. This is super entangled with ImageBuffer |
28 // and canvas/video painting in Blink where the same paths are used for | 28 // and canvas/video painting in Blink where the same paths are used for |
29 // both recording and gpu work. | 29 // both recording and gpu work. |
30 virtual void flush() = 0; | 30 virtual void flush() = 0; |
31 | 31 |
32 virtual SkISize getBaseLayerSize() const = 0; | 32 virtual SkISize getBaseLayerSize() const = 0; |
33 virtual bool peekPixels(SkPixmap* pixmap) = 0; | |
34 virtual bool readPixels(const SkImageInfo& dest_info, | 33 virtual bool readPixels(const SkImageInfo& dest_info, |
35 void* dest_pixels, | 34 void* dest_pixels, |
36 size_t dest_row_bytes, | 35 size_t dest_row_bytes, |
37 int src_x, | 36 int src_x, |
38 int src_y) = 0; | 37 int src_y) = 0; |
39 virtual bool readPixels(SkBitmap* bitmap, int src_x, int src_y) = 0; | 38 virtual bool readPixels(SkBitmap* bitmap, int src_x, int src_y) = 0; |
40 virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) = 0; | 39 virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) = 0; |
41 virtual bool writePixels(const SkImageInfo& info, | 40 virtual bool writePixels(const SkImageInfo& info, |
42 const void* pixels, | 41 const void* pixels, |
43 size_t row_bytes, | 42 size_t row_bytes, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 const SkPoint& point, | 265 const SkPoint& point, |
267 SkData* data); | 266 SkData* data); |
268 | 267 |
269 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, | 268 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, |
270 const SkRect& rect, | 269 const SkRect& rect, |
271 SkData* data); | 270 SkData* data); |
272 | 271 |
273 } // namespace cc | 272 } // namespace cc |
274 | 273 |
275 #endif // CC_PAINT_PAINT_CANVAS_H_ | 274 #endif // CC_PAINT_PAINT_CANVAS_H_ |
OLD | NEW |