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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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/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 6370a2ef328d7048a786f061bc97e8171b0ddb95..f7a58a499ac7e9524df449274dccfddeb5a6d6b9 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -49,7 +49,7 @@ FakeContentLayerClient::PaintContentsToDisplayList(
DisplayItemListSettings settings;
settings.use_cached_picture = true;
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(PaintableRegion(), settings);
+ DisplayItemList::Create(settings);
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas;
skia::RefPtr<SkPicture> picture;
@@ -74,8 +74,9 @@ FakeContentLayerClient::PaintContentsToDisplayList(
PaintableRegion());
item->SetNew(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);
picture = skia::AdoptRef(recorder.endRecordingAsPicture());

Powered by Google App Engine
This is Rietveld 408576698