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

Unified Diff: cc/playback/raster_source.h

Issue 2075873002: Support general raster matrix for RasterSource and DisplayItemList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a bug in PrepareForPlaybackToCanvas and fix cc_unittests Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/playback/raster_source.h
diff --git a/cc/playback/raster_source.h b/cc/playback/raster_source.h
index 3a2139d3d2a8a456c8b2c8f8c86e738a015a7dc7..c50c4a0f626a4bdf2e38864d3d910ccf65822b0e 100644
--- a/cc/playback/raster_source.h
+++ b/cc/playback/raster_source.h
@@ -43,21 +43,23 @@ class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> {
const RecordingSource* other,
bool can_use_lcd_text);
- // Raster a subrect of this RasterSource into the given canvas. It is
- // assumed that contents_scale has already been applied to this canvas.
- // Writes the total number of pixels rasterized and the time spent
- // rasterizing to the stats if the respective pointer is not nullptr.
- // It is assumed that the canvas passed here will only be rasterized by
- // this raster source via this call.
+ // TODO(trchen): Deprecated.
+ void PlaybackToCanvas(SkCanvas* canvas,
+ const gfx::Rect& canvas_bitmap_rect,
+ const gfx::Rect& canvas_playback_rect,
+ float contents_scale,
+ const PlaybackSettings& settings) const;
+
+ // Raster this RasterSource into the given canvas. Canvas states such as
+ // CTM and clip region will be respected. This function will replace pixels
+ // in the clip region without blending. It is assumed that existing pixels
+ // may be uninitialized and will be cleared before playback.
//
// Virtual for testing.
//
// Note that this should only be called after the image decode controller has
// been set, which happens during commit.
virtual void PlaybackToCanvas(SkCanvas* canvas,
- const gfx::Rect& canvas_bitmap_rect,
- const gfx::Rect& canvas_playback_rect,
- float contents_scale,
const PlaybackSettings& settings) const;
// Returns whether the given rect at given scale is of solid color in
@@ -145,16 +147,9 @@ class CC_EXPORT RasterSource : public base::RefCountedThreadSafe<RasterSource> {
ImageDecodeController* image_decode_controller_;
private:
- void RasterCommon(SkCanvas* canvas,
- SkPicture::AbortCallback* callback,
- const gfx::Rect& canvas_bitmap_rect,
- const gfx::Rect& canvas_playback_rect,
- float contents_scale) const;
-
- void PrepareForPlaybackToCanvas(SkCanvas* canvas,
- const gfx::Rect& canvas_bitmap_rect,
- const gfx::Rect& canvas_playback_rect,
- float contents_scale) const;
+ void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const;
+
+ void PrepareForPlaybackToCanvas(SkCanvas* canvas) const;
DISALLOW_COPY_AND_ASSIGN(RasterSource);
};

Powered by Google App Engine
This is Rietveld 408576698