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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/proto/display_item.proto ('k') | cc/test/fake_display_list_raster_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer_client.cc
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 49cf38f184910c97c28e1e760999748dc08aabd2..3a4a2df285376d0d2851a205323510084bb1776c 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -55,7 +55,8 @@ FakeContentLayerClient::PaintContentsToDisplayList(
DisplayItemListSettings settings;
settings.use_cached_picture = display_list_use_cached_picture_;
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(PaintableRegion(), settings);
+ DisplayItemList::Create(settings);
+ display_list->SetRetainVisualRectsForTesting(true);
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas;
@@ -76,8 +77,9 @@ FakeContentLayerClient::PaintContentsToDisplayList(
display_list->CreateAndAppendItem<TransformDisplayItem>(PaintableRegion(),
it->transform);
}
- canvas = skia::SharePtr(
- recorder.beginRecording(it->image->width(), it->image->height()));
+ int width = it->image->width() + it->point.x();
+ int height = it->image->height() + it->point.y();
+ canvas = skia::SharePtr(recorder.beginRecording(width, height));
canvas->drawImage(it->image.get(), it->point.x(), it->point.y(),
&it->paint);
display_list->CreateAndAppendItem<DrawingDisplayItem>(
@@ -103,7 +105,6 @@ FakeContentLayerClient::PaintContentsToDisplayList(
}
}
-
display_list->Finalize();
return display_list;
}
« no previous file with comments | « cc/proto/display_item.proto ('k') | cc/test/fake_display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698