Chromium Code Reviews| 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 5078a650e1101c24a5cdea8c87b651d957c9d7fb..f34fb9231b97471299fae5663b10beef16ada5d8 100644 |
| --- a/cc/test/fake_content_layer_client.cc |
| +++ b/cc/test/fake_content_layer_client.cc |
| @@ -43,19 +43,19 @@ gfx::Rect FakeContentLayerClient::PaintableRegion() { |
| scoped_refptr<DisplayItemList> |
| FakeContentLayerClient::PaintContentsToDisplayList( |
| - const gfx::Rect& clip, |
| PaintingControlSetting painting_control) { |
| // Cached picture is used because unit tests expect to be able to |
| // use GatherPixelRefs. |
| DisplayItemListSettings settings; |
| settings.use_cached_picture = true; |
| scoped_refptr<DisplayItemList> display_list = |
| - DisplayItemList::Create(clip, settings); |
| + DisplayItemList::Create(PaintableRegion(), settings); |
| SkPictureRecorder recorder; |
| skia::RefPtr<SkCanvas> canvas; |
| skia::RefPtr<SkPicture> picture; |
| - auto* item = display_list->CreateAndAppendItem<ClipDisplayItem>(clip); |
| - item->SetNew(clip, std::vector<SkRRect>()); |
| + auto* item = |
| + display_list->CreateAndAppendItem<ClipDisplayItem>(PaintableRegion()); |
| + item->SetNew(PaintableRegion(), std::vector<SkRRect>()); |
|
enne (OOO)
2015/12/01 22:43:16
I think you should either not append a clip item a
enne (OOO)
2015/12/01 22:46:25
Oops, I guess this is in a test. So, probably it
chrishtr
2015/12/01 23:01:20
Removed.
|
| for (RectPaintVector::const_iterator it = draw_rects_.begin(); |
| it != draw_rects_.end(); ++it) { |
| @@ -73,8 +73,8 @@ FakeContentLayerClient::PaintContentsToDisplayList( |
| for (ImageVector::const_iterator it = draw_images_.begin(); |
| it != draw_images_.end(); ++it) { |
| if (!it->transform.IsIdentity()) { |
| - auto* item = |
| - display_list->CreateAndAppendItem<TransformDisplayItem>(clip); |
| + auto* item = display_list->CreateAndAppendItem<TransformDisplayItem>( |
| + PaintableRegion()); |
| item->SetNew(it->transform); |
| } |
| canvas = skia::SharePtr( |
| @@ -82,15 +82,17 @@ FakeContentLayerClient::PaintContentsToDisplayList( |
| canvas->drawImage(it->image.get(), it->point.x(), it->point.y(), |
| &it->paint); |
| picture = skia::AdoptRef(recorder.endRecordingAsPicture()); |
| - auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(clip); |
| + auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>( |
| + PaintableRegion()); |
| item->SetNew(std::move(picture)); |
| if (!it->transform.IsIdentity()) { |
| - display_list->CreateAndAppendItem<EndTransformDisplayItem>(clip); |
| + display_list->CreateAndAppendItem<EndTransformDisplayItem>( |
| + PaintableRegion()); |
| } |
| } |
| if (fill_with_nonsolid_color_) { |
| - gfx::Rect draw_rect = clip; |
| + gfx::Rect draw_rect = PaintableRegion(); |
| bool red = true; |
| while (!draw_rect.IsEmpty()) { |
| SkPaint paint; |
| @@ -106,7 +108,7 @@ FakeContentLayerClient::PaintContentsToDisplayList( |
| } |
| } |
| - display_list->CreateAndAppendItem<EndClipDisplayItem>(clip); |
| + display_list->CreateAndAppendItem<EndClipDisplayItem>(PaintableRegion()); |
| display_list->Finalize(); |
| return display_list; |