diff options
Diffstat (limited to 'cc/test/fake_content_layer_client.cc')
-rw-r--r-- | cc/test/fake_content_layer_client.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc index 5d949bf..b0dacb3 100644 --- a/cc/test/fake_content_layer_client.cc +++ b/cc/test/fake_content_layer_client.cc @@ -71,10 +71,15 @@ void FakeContentLayerClient::PaintContents( } } -void FakeContentLayerClient::PaintContentsToDisplayList( - DisplayItemList* display_list, +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. + const bool use_cached_picture = true; + scoped_refptr<DisplayItemList> display_list = + DisplayItemList::Create(clip, use_cached_picture); SkPictureRecorder recorder; skia::RefPtr<SkCanvas> canvas; skia::RefPtr<SkPicture> picture; @@ -128,6 +133,9 @@ void FakeContentLayerClient::PaintContentsToDisplayList( } display_list->CreateAndAppendItem<EndClipDisplayItem>(); + + display_list->Finalize(); + return display_list; } bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } |