summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_picture_pile_impl.cc
diff options
context:
space:
mode:
authordominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 21:33:21 +0000
committerdominikg@chromium.org <dominikg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 21:33:21 +0000
commitd851e2fe6bc837a135dfb36a0e8861b4d84d738f (patch)
treed418d9039fcd145a4f2e7e4e62f9e01432e02605 /cc/test/fake_picture_pile_impl.cc
parente8ff1ad4a40d8f525a457b1231f31ff1068fc7a7 (diff)
downloadchromium_src-d851e2fe6bc837a135dfb36a0e8861b4d84d738f.zip
chromium_src-d851e2fe6bc837a135dfb36a0e8861b4d84d738f.tar.gz
chromium_src-d851e2fe6bc837a135dfb36a0e8861b4d84d738f.tar.bz2
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
Diffstat (limited to 'cc/test/fake_picture_pile_impl.cc')
-rw-r--r--cc/test/fake_picture_pile_impl.cc5
1 files changed, 2 insertions, 3 deletions
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(Picture::Create(bounds));
- picture->Record(&client_, tile_grid_info_);
- picture->GatherPixelRefs(tile_grid_info_);
+ scoped_refptr<Picture> picture(
+ Picture::Create(bounds, &client_, tile_grid_info_, true, 0));
picture_map_[std::pair<int, int>(x, y)].SetPicture(picture);
EXPECT_TRUE(HasRecordingAt(x, y));