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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 2230513005: Move visual rect unioning between paired items to cc::DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback. Created 4 years, 4 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/playback/display_item_proto_factory.cc ('k') | cc/test/geometry_test_utils.h » ('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 d1b1537af32b6edd94f8127dd6e8adb60269e974..597eb021dae75afbb5a7e5bea44418440628f601 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -65,25 +65,24 @@ FakeContentLayerClient::PaintContentsToDisplayList(
const SkPaint& paint = it->second;
canvas = sk_ref_sp(recorder.beginRecording(gfx::RectFToSkRect(draw_rect)));
canvas->drawRect(gfx::RectFToSkRect(draw_rect), paint);
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
ToEnclosingRect(draw_rect), recorder.finishRecordingAsPicture());
}
for (ImageVector::const_iterator it = draw_images_.begin();
it != draw_images_.end(); ++it) {
if (!it->transform.IsIdentity()) {
- display_list->CreateAndAppendItem<TransformDisplayItem>(PaintableRegion(),
- it->transform);
+ display_list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(
+ it->transform);
}
canvas = sk_ref_sp(
recorder.beginRecording(it->image->width(), it->image->height()));
canvas->drawImage(it->image.get(), it->point.x(), it->point.y(),
&it->paint);
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
PaintableRegion(), recorder.finishRecordingAsPicture());
if (!it->transform.IsIdentity()) {
- display_list->CreateAndAppendItem<EndTransformDisplayItem>(
- PaintableRegion());
+ display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
}
}
@@ -95,7 +94,7 @@ FakeContentLayerClient::PaintContentsToDisplayList(
paint.setColor(red ? SK_ColorRED : SK_ColorBLUE);
canvas = sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(draw_rect)));
canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint);
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
draw_rect, recorder.finishRecordingAsPicture());
draw_rect.Inset(1, 1);
}
« no previous file with comments | « cc/playback/display_item_proto_factory.cc ('k') | cc/test/geometry_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698