| Index: cc/playback/display_item_list.cc
|
| diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
|
| index 068cb00999b665bedd8d587cef4a66c2fe128a66..fff2f5c9c045d5acd32cf63672d197c22523d47e 100644
|
| --- a/cc/playback/display_item_list.cc
|
| +++ b/cc/playback/display_item_list.cc
|
| @@ -44,7 +44,7 @@ bool DisplayItemsTracingEnabled() {
|
| return tracing_enabled;
|
| }
|
|
|
| -bool GetCanvasClipBounds(SkCanvas* canvas, gfx::Rect* clip_bounds) {
|
| +bool GetCanvasClipBounds(CdlCanvas* canvas, gfx::Rect* clip_bounds) {
|
| SkRect canvas_clip_bounds;
|
| if (!canvas->getClipBounds(&canvas_clip_bounds))
|
| return false;
|
| @@ -111,7 +111,7 @@ void DisplayItemList::ToProtobuf(proto::DisplayItemList* proto) {
|
| }
|
| }
|
|
|
| -void DisplayItemList::Raster(SkCanvas* canvas,
|
| +void DisplayItemList::Raster(CdlCanvas* canvas,
|
| SkPicture::AbortCallback* callback,
|
| const gfx::Rect& canvas_target_playback_rect,
|
| float contents_scale) const {
|
| @@ -130,7 +130,7 @@ void DisplayItemList::Raster(SkCanvas* canvas,
|
| }
|
|
|
| DISABLE_CFI_PERF
|
| -void DisplayItemList::Raster(SkCanvas* canvas,
|
| +void DisplayItemList::Raster(CdlCanvas* canvas,
|
| SkPicture::AbortCallback* callback) const {
|
| gfx::Rect canvas_playback_rect;
|
| if (!GetCanvasClipBounds(canvas, &canvas_playback_rect))
|
| @@ -231,10 +231,12 @@ DisplayItemList::AsValue(bool include_items) const {
|
|
|
| SkPictureRecorder recorder;
|
| gfx::Rect bounds = rtree_.GetBounds();
|
| - SkCanvas* canvas = recorder.beginRecording(bounds.width(), bounds.height());
|
| - canvas->translate(-bounds.x(), -bounds.y());
|
| - canvas->clipRect(gfx::RectToSkRect(bounds));
|
| - Raster(canvas, nullptr, gfx::Rect(), 1.f);
|
| + SkCanvas* sk_canvas =
|
| + recorder.beginRecording(bounds.width(), bounds.height());
|
| + CdlPassThroughCanvas canvas(sk_canvas);
|
| + canvas.translate(-bounds.x(), -bounds.y());
|
| + canvas.clipRect(gfx::RectToSkRect(bounds));
|
| + Raster(&canvas, nullptr, gfx::Rect(), 1.f);
|
| sk_sp<SkPicture> picture = recorder.finishRecordingAsPicture();
|
|
|
| std::string b64_picture;
|
|
|