Chromium Code Reviews| Index: cc/playback/raster_source.h |
| diff --git a/cc/playback/raster_source.h b/cc/playback/raster_source.h |
| index e4da161c5382fb47f45fa74e80f49fd4e36883e4..6e2feb8d805d765ce7b77c31dbe6bed27a692c3b 100644 |
| --- a/cc/playback/raster_source.h |
| +++ b/cc/playback/raster_source.h |
| @@ -21,6 +21,7 @@ namespace cc { |
| class DisplayItemList; |
| class DrawImage; |
| class ImageDecodeController; |
| +class ScaleTranslate2d; |
| class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> { |
| public: |
| @@ -43,11 +44,18 @@ class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> { |
| const RecordingSource* other, |
| bool can_use_lcd_text); |
| - // TODO(trchen): Deprecated. |
| + // Helper function to apply a few common operations before passing the canvas |
| + // to the shorter version. This is useful for rastering into tiles. |
| + // canvas is expected to be backed by a tile, with a default state. |
| + // contents_transform will be applied to the display list, rastering the list |
| + // into the "content space". |
| + // canvas_bitmap_rect defines the extent of the tile in the content space, |
| + // i.e. contents in the rect will be cropped and translated onto the canvas. |
| + // canvas_playback_rect defines the damange rect in the content space. |
|
enne (OOO)
2016/08/29 20:21:19
It's true that the canvas_playback_rect is the dam
|
| void PlaybackToCanvas(SkCanvas* canvas, |
| const gfx::Rect& canvas_bitmap_rect, |
| const gfx::Rect& canvas_playback_rect, |
| - float contents_scale, |
| + const ScaleTranslate2d& contents_transform, |
| const PlaybackSettings& settings) const; |
| // Raster this RasterSource into the given canvas. Canvas states such as |