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

Side by Side Diff: cc/test/fake_picture_pile_impl.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_json_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/fake_picture_pile_impl.h" 5 #include "cc/test/fake_picture_pile_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 EXPECT_GE(x, 0); 113 EXPECT_GE(x, 0);
114 EXPECT_GE(y, 0); 114 EXPECT_GE(y, 0);
115 EXPECT_LT(x, tiling_.num_tiles_x()); 115 EXPECT_LT(x, tiling_.num_tiles_x());
116 EXPECT_LT(y, tiling_.num_tiles_y()); 116 EXPECT_LT(y, tiling_.num_tiles_y());
117 117
118 if (HasRecordingAt(x, y)) 118 if (HasRecordingAt(x, y))
119 return; 119 return;
120 gfx::Rect bounds(tiling().TileBounds(x, y)); 120 gfx::Rect bounds(tiling().TileBounds(x, y));
121 bounds.Inset(-buffer_pixels(), -buffer_pixels()); 121 bounds.Inset(-buffer_pixels(), -buffer_pixels());
122 122
123 scoped_refptr<Picture> picture(Picture::Create( 123 scoped_refptr<Picture> picture(
124 bounds, &client_, tile_grid_size_, true, Picture::RECORD_NORMALLY)); 124 Picture::Create(bounds, &client_, tile_grid_size_, true,
125 RecordingSource::RECORD_NORMALLY));
125 picture_map_[std::pair<int, int>(x, y)].SetPicture(picture); 126 picture_map_[std::pair<int, int>(x, y)].SetPicture(picture);
126 EXPECT_TRUE(HasRecordingAt(x, y)); 127 EXPECT_TRUE(HasRecordingAt(x, y));
127 128
128 has_any_recordings_ = true; 129 has_any_recordings_ = true;
129 } 130 }
130 131
131 void FakePicturePileImpl::RemoveRecordingAt(int x, int y) { 132 void FakePicturePileImpl::RemoveRecordingAt(int x, int y) {
132 EXPECT_GE(x, 0); 133 EXPECT_GE(x, 0);
133 EXPECT_GE(y, 0); 134 EXPECT_GE(y, 0);
134 EXPECT_LT(x, tiling_.num_tiles_x()); 135 EXPECT_LT(x, tiling_.num_tiles_x());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 Clear(); 184 Clear();
184 tiling_.SetBorderTexels(new_buffer_pixels); 185 tiling_.SetBorderTexels(new_buffer_pixels);
185 } 186 }
186 187
187 void FakePicturePileImpl::Clear() { 188 void FakePicturePileImpl::Clear() {
188 picture_map_.clear(); 189 picture_map_.clear();
189 recorded_viewport_ = gfx::Rect(); 190 recorded_viewport_ = gfx::Rect();
190 } 191 }
191 192
192 } // namespace cc 193 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_json_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698