From d851e2fe6bc837a135dfb36a0e8861b4d84d738f Mon Sep 17 00:00:00 2001 From: "dominikg@chromium.org" Date: Fri, 7 Feb 2014 21:33:21 +0000 Subject: Make cc::Picture immutable except for Raster and Replay. Makes methods involved in picture recording private so they're only called from within factory methods. All public methods, apart from Raster and Replay, are now const. This CL also adds a DCHECK to ensure that cc::Picture::Raster and ::Replay are always called from the same thread. BUG=333855 Review URL: https://codereview.chromium.org/139313003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249791 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/fake_picture_pile_impl.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cc/test/fake_picture_pile_impl.cc') diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc index 9b168e6..bb60034 100644 --- a/cc/test/fake_picture_pile_impl.cc +++ b/cc/test/fake_picture_pile_impl.cc @@ -75,9 +75,8 @@ void FakePicturePileImpl::AddRecordingAt(int x, int y) { gfx::Rect bounds(tiling().TileBounds(x, y)); bounds.Inset(-buffer_pixels(), -buffer_pixels()); - scoped_refptr picture(Picture::Create(bounds)); - picture->Record(&client_, tile_grid_info_); - picture->GatherPixelRefs(tile_grid_info_); + scoped_refptr picture( + Picture::Create(bounds, &client_, tile_grid_info_, true, 0)); picture_map_[std::pair(x, y)].SetPicture(picture); EXPECT_TRUE(HasRecordingAt(x, y)); -- cgit v1.1