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

Side by Side Diff: cc/playback/picture_pile_impl_unittest.cc

Issue 1279843004: cc: Plumb more details about pixel refs to tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/playback/picture_pile_impl.cc ('k') | cc/playback/pixel_ref_map.h » ('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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "cc/test/fake_picture_pile_impl.h" 6 #include "cc/test/fake_picture_pile_impl.h"
7 #include "cc/test/skia_common.h" 7 #include "cc/test/skia_common.h"
8 #include "skia/ext/refptr.h" 8 #include "skia/ext/refptr.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/core/SkPixelRef.h" 10 #include "third_party/skia/include/core/SkPixelRef.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 recording_source->Rerecord(); 186 recording_source->Rerecord();
187 187
188 scoped_refptr<FakePicturePileImpl> pile = 188 scoped_refptr<FakePicturePileImpl> pile =
189 FakePicturePileImpl::CreateFromPile(recording_source.get(), nullptr); 189 FakePicturePileImpl::CreateFromPile(recording_source.get(), nullptr);
190 190
191 // Tile sized iterators. These should find only one pixel ref. 191 // Tile sized iterators. These should find only one pixel ref.
192 { 192 {
193 PicturePileImpl::PixelRefIterator iterator( 193 PicturePileImpl::PixelRefIterator iterator(
194 gfx::Rect(0, 0, 256, 256), 1.0, pile.get()); 194 gfx::Rect(0, 0, 256, 256), 1.0, pile.get());
195 EXPECT_TRUE(iterator); 195 EXPECT_TRUE(iterator);
196 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 196 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
197 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
198 gfx::RectF(32, 32).ToString());
197 EXPECT_FALSE(++iterator); 199 EXPECT_FALSE(++iterator);
198 } 200 }
199 { 201 {
200 PicturePileImpl::PixelRefIterator iterator( 202 PicturePileImpl::PixelRefIterator iterator(
201 gfx::Rect(0, 0, 512, 512), 2.0, pile.get()); 203 gfx::Rect(0, 0, 512, 512), 2.0, pile.get());
202 EXPECT_TRUE(iterator); 204 EXPECT_TRUE(iterator);
203 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 205 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
206 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
207 gfx::RectF(32, 32).ToString());
204 EXPECT_FALSE(++iterator); 208 EXPECT_FALSE(++iterator);
205 } 209 }
206 { 210 {
207 PicturePileImpl::PixelRefIterator iterator( 211 PicturePileImpl::PixelRefIterator iterator(
208 gfx::Rect(0, 0, 128, 128), 0.5, pile.get()); 212 gfx::Rect(0, 0, 128, 128), 0.5, pile.get());
209 EXPECT_TRUE(iterator); 213 EXPECT_TRUE(iterator);
210 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 214 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
215 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
216 gfx::RectF(32, 32).ToString());
211 EXPECT_FALSE(++iterator); 217 EXPECT_FALSE(++iterator);
212 } 218 }
213 // Shifted tile sized iterators. These should find only one pixel ref. 219 // Shifted tile sized iterators. These should find only one pixel ref.
214 { 220 {
215 PicturePileImpl::PixelRefIterator iterator( 221 PicturePileImpl::PixelRefIterator iterator(
216 gfx::Rect(260, 260, 256, 256), 1.0, pile.get()); 222 gfx::Rect(260, 260, 256, 256), 1.0, pile.get());
217 EXPECT_TRUE(iterator); 223 EXPECT_TRUE(iterator);
218 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 224 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
225 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
226 gfx::RectF(260, 260, 32, 32).ToString());
219 EXPECT_FALSE(++iterator); 227 EXPECT_FALSE(++iterator);
220 } 228 }
221 { 229 {
222 PicturePileImpl::PixelRefIterator iterator( 230 PicturePileImpl::PixelRefIterator iterator(
223 gfx::Rect(520, 520, 512, 512), 2.0, pile.get()); 231 gfx::Rect(520, 520, 512, 512), 2.0, pile.get());
224 EXPECT_TRUE(iterator); 232 EXPECT_TRUE(iterator);
225 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 233 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
234 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
235 gfx::RectF(260, 260, 32, 32).ToString());
226 EXPECT_FALSE(++iterator); 236 EXPECT_FALSE(++iterator);
227 } 237 }
228 { 238 {
229 PicturePileImpl::PixelRefIterator iterator( 239 PicturePileImpl::PixelRefIterator iterator(
230 gfx::Rect(130, 130, 128, 128), 0.5, pile.get()); 240 gfx::Rect(130, 130, 128, 128), 0.5, pile.get());
231 EXPECT_TRUE(iterator); 241 EXPECT_TRUE(iterator);
232 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 242 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
243 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
244 gfx::RectF(260, 260, 32, 32).ToString());
233 EXPECT_FALSE(++iterator); 245 EXPECT_FALSE(++iterator);
234 } 246 }
235 // Ensure there's no discardable pixel refs in the empty cell 247 // Ensure there's no discardable pixel refs in the empty cell
236 { 248 {
237 PicturePileImpl::PixelRefIterator iterator( 249 PicturePileImpl::PixelRefIterator iterator(
238 gfx::Rect(0, 256, 256, 256), 1.0, pile.get()); 250 gfx::Rect(0, 256, 256, 256), 1.0, pile.get());
239 EXPECT_FALSE(iterator); 251 EXPECT_FALSE(iterator);
240 } 252 }
241 // Layer sized iterators. These should find three pixel ref. 253 // Layer sized iterators. These should find three pixel ref.
242 { 254 {
243 PicturePileImpl::PixelRefIterator iterator( 255 PicturePileImpl::PixelRefIterator iterator(
244 gfx::Rect(0, 0, 512, 512), 1.0, pile.get()); 256 gfx::Rect(0, 0, 512, 512), 1.0, pile.get());
245 EXPECT_TRUE(iterator); 257 EXPECT_TRUE(iterator);
246 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 258 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
259 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
260 gfx::RectF(32, 32).ToString());
247 EXPECT_TRUE(++iterator); 261 EXPECT_TRUE(++iterator);
248 EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); 262 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][1].pixelRef());
263 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
264 gfx::RectF(260, 0, 32, 32).ToString());
249 EXPECT_TRUE(++iterator); 265 EXPECT_TRUE(++iterator);
250 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 266 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
267 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
268 gfx::RectF(260, 260, 32, 32).ToString());
251 EXPECT_FALSE(++iterator); 269 EXPECT_FALSE(++iterator);
252 } 270 }
253 { 271 {
254 PicturePileImpl::PixelRefIterator iterator( 272 PicturePileImpl::PixelRefIterator iterator(
255 gfx::Rect(0, 0, 1024, 1024), 2.0, pile.get()); 273 gfx::Rect(0, 0, 1024, 1024), 2.0, pile.get());
256 EXPECT_TRUE(iterator); 274 EXPECT_TRUE(iterator);
257 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 275 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
276 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
277 gfx::RectF(32, 32).ToString());
258 EXPECT_TRUE(++iterator); 278 EXPECT_TRUE(++iterator);
259 EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); 279 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][1].pixelRef());
280 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
281 gfx::RectF(260, 0, 32, 32).ToString());
260 EXPECT_TRUE(++iterator); 282 EXPECT_TRUE(++iterator);
261 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 283 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
284 EXPECT_EQ(gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString(),
285 gfx::RectF(260, 260, 32, 32).ToString());
262 EXPECT_FALSE(++iterator); 286 EXPECT_FALSE(++iterator);
263 } 287 }
264 { 288 {
265 PicturePileImpl::PixelRefIterator iterator( 289 PicturePileImpl::PixelRefIterator iterator(
266 gfx::Rect(0, 0, 256, 256), 0.5, pile.get()); 290 gfx::Rect(0, 0, 256, 256), 0.5, pile.get());
267 EXPECT_TRUE(iterator); 291 EXPECT_TRUE(iterator);
268 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 292 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
293 EXPECT_EQ(gfx::RectF(32, 32).ToString(),
294 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
269 EXPECT_TRUE(++iterator); 295 EXPECT_TRUE(++iterator);
270 EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); 296 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][1].pixelRef());
297 EXPECT_EQ(gfx::RectF(260, 0, 32, 32).ToString(),
298 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
271 EXPECT_TRUE(++iterator); 299 EXPECT_TRUE(++iterator);
272 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 300 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
301 EXPECT_EQ(gfx::RectF(260, 260, 32, 32).ToString(),
302 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
273 EXPECT_FALSE(++iterator); 303 EXPECT_FALSE(++iterator);
274 } 304 }
275 305
276 // Copy test. 306 {
277 PicturePileImpl::PixelRefIterator iterator( 307 // Copy test.
278 gfx::Rect(0, 0, 512, 512), 1.0, pile.get()); 308 PicturePileImpl::PixelRefIterator iterator(gfx::Rect(0, 0, 512, 512), 1.0,
279 EXPECT_TRUE(iterator); 309 pile.get());
280 EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); 310 EXPECT_TRUE(iterator);
281 EXPECT_TRUE(++iterator); 311 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][0].pixelRef());
282 EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); 312 EXPECT_EQ(gfx::RectF(32, 32).ToString(),
313 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
314 EXPECT_TRUE(++iterator);
315 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0][1].pixelRef());
316 EXPECT_EQ(gfx::RectF(260, 0, 32, 32).ToString(),
317 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
283 318
284 // copy now points to the same spot as iterator, 319 // copy now points to the same spot as iterator,
285 // but both can be incremented independently. 320 // but both can be incremented independently.
286 PicturePileImpl::PixelRefIterator copy = iterator; 321 PicturePileImpl::PixelRefIterator copy = iterator;
287 EXPECT_TRUE(++iterator); 322 EXPECT_TRUE(++iterator);
288 EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); 323 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1][1].pixelRef());
289 EXPECT_FALSE(++iterator); 324 EXPECT_EQ(gfx::RectF(260, 260, 32, 32).ToString(),
325 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
326 EXPECT_FALSE(++iterator);
290 327
291 EXPECT_TRUE(copy); 328 EXPECT_TRUE(copy);
292 EXPECT_TRUE(*copy == discardable_bitmap[0][1].pixelRef()); 329 EXPECT_TRUE(copy->pixel_ref == discardable_bitmap[0][1].pixelRef());
293 EXPECT_TRUE(++copy); 330 EXPECT_EQ(gfx::RectF(260, 0, 32, 32).ToString(),
294 EXPECT_TRUE(*copy == discardable_bitmap[1][1].pixelRef()); 331 gfx::SkRectToRectF(copy->pixel_ref_rect).ToString());
295 EXPECT_FALSE(++copy); 332 EXPECT_TRUE(++copy);
333 EXPECT_TRUE(copy->pixel_ref == discardable_bitmap[1][1].pixelRef());
334 EXPECT_EQ(gfx::RectF(260, 260, 32, 32).ToString(),
335 gfx::SkRectToRectF(copy->pixel_ref_rect).ToString());
336 EXPECT_FALSE(++copy);
337 }
296 } 338 }
297 339
298 TEST(PicturePileImplTest, RasterFullContents) { 340 TEST(PicturePileImplTest, RasterFullContents) {
299 gfx::Size tile_size(1000, 1000); 341 gfx::Size tile_size(1000, 1000);
300 gfx::Size layer_bounds(3, 5); 342 gfx::Size layer_bounds(3, 5);
301 float contents_scale = 1.5f; 343 float contents_scale = 1.5f;
302 float raster_divisions = 2.f; 344 float raster_divisions = 2.f;
303 345
304 scoped_ptr<FakePicturePile> recording_source = 346 scoped_ptr<FakePicturePile> recording_source =
305 FakePicturePile::CreateFilledPile(tile_size, layer_bounds); 347 FakePicturePile::CreateFilledPile(tile_size, layer_bounds);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 FakePicturePile::CreateFilledPile(tile_size, layer_bounds); 515 FakePicturePile::CreateFilledPile(tile_size, layer_bounds);
474 recording_source->SetMinContentsScale(0.5f); 516 recording_source->SetMinContentsScale(0.5f);
475 517
476 // Bitmaps 0-2 are exactly on tiles 0-2, so that they overlap the borders 518 // Bitmaps 0-2 are exactly on tiles 0-2, so that they overlap the borders
477 // of adjacent tiles. 519 // of adjacent tiles.
478 gfx::Rect bitmap_rects[] = { 520 gfx::Rect bitmap_rects[] = {
479 recording_source->tiling().TileBounds(0, 0), 521 recording_source->tiling().TileBounds(0, 0),
480 recording_source->tiling().TileBounds(1, 0), 522 recording_source->tiling().TileBounds(1, 0),
481 recording_source->tiling().TileBounds(2, 0), 523 recording_source->tiling().TileBounds(2, 0),
482 }; 524 };
525 gfx::RectF expected_rects[] = {
526 gfx::RectF(recording_source->tiling().TileBounds(0, 0)),
527 gfx::RectF(recording_source->tiling().TileBounds(1, 0)),
528 gfx::RectF(recording_source->tiling().TileBounds(2, 0)),
529 };
483 SkBitmap discardable_bitmap[arraysize(bitmap_rects)]; 530 SkBitmap discardable_bitmap[arraysize(bitmap_rects)];
484 531
485 for (size_t i = 0; i < arraysize(bitmap_rects); ++i) { 532 for (size_t i = 0; i < arraysize(bitmap_rects); ++i) {
486 CreateBitmap(bitmap_rects[i].size(), "discardable", &discardable_bitmap[i]); 533 CreateBitmap(bitmap_rects[i].size(), "discardable", &discardable_bitmap[i]);
487 recording_source->add_draw_bitmap(discardable_bitmap[i], 534 recording_source->add_draw_bitmap(discardable_bitmap[i],
488 bitmap_rects[i].origin()); 535 bitmap_rects[i].origin());
489 } 536 }
490 537
491 recording_source->SetGatherPixelRefs(true); 538 recording_source->SetGatherPixelRefs(true);
492 recording_source->Rerecord(); 539 recording_source->Rerecord();
(...skipping 16 matching lines...) Expand all
509 bitmap_rects[2].Intersects(pile->tiling().TileBoundsWithBorder(1, 0))); 556 bitmap_rects[2].Intersects(pile->tiling().TileBoundsWithBorder(1, 0)));
510 EXPECT_FALSE(bitmap_rects[2].Intersects(pile->tiling().TileBounds(1, 0))); 557 EXPECT_FALSE(bitmap_rects[2].Intersects(pile->tiling().TileBounds(1, 0)));
511 558
512 // Tile-sized iterators. 559 // Tile-sized iterators.
513 { 560 {
514 // Because tile 0's borders extend onto tile 1, it will include both 561 // Because tile 0's borders extend onto tile 1, it will include both
515 // bitmap 0 and 1. However, it should *not* include bitmap 2. 562 // bitmap 0 and 1. However, it should *not* include bitmap 2.
516 PicturePileImpl::PixelRefIterator iterator( 563 PicturePileImpl::PixelRefIterator iterator(
517 pile->tiling().TileBounds(0, 0), 1.f, pile.get()); 564 pile->tiling().TileBounds(0, 0), 1.f, pile.get());
518 EXPECT_TRUE(iterator); 565 EXPECT_TRUE(iterator);
519 EXPECT_TRUE(*iterator == discardable_bitmap[0].pixelRef()); 566 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0].pixelRef());
567 EXPECT_EQ(expected_rects[0].ToString(),
568 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
520 EXPECT_TRUE(++iterator); 569 EXPECT_TRUE(++iterator);
521 EXPECT_TRUE(*iterator == discardable_bitmap[1].pixelRef()); 570 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1].pixelRef());
571 EXPECT_EQ(expected_rects[1].ToString(),
572 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
522 EXPECT_FALSE(++iterator); 573 EXPECT_FALSE(++iterator);
523 } 574 }
524 { 575 {
525 // Tile 1 + borders hits all bitmaps. 576 // Tile 1 + borders hits all bitmaps.
526 PicturePileImpl::PixelRefIterator iterator( 577 PicturePileImpl::PixelRefIterator iterator(
527 pile->tiling().TileBounds(1, 0), 1.f, pile.get()); 578 pile->tiling().TileBounds(1, 0), 1.f, pile.get());
528 EXPECT_TRUE(iterator); 579 EXPECT_TRUE(iterator);
529 EXPECT_TRUE(*iterator == discardable_bitmap[0].pixelRef()); 580 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[0].pixelRef());
581 EXPECT_EQ(expected_rects[0].ToString(),
582 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
530 EXPECT_TRUE(++iterator); 583 EXPECT_TRUE(++iterator);
531 EXPECT_TRUE(*iterator == discardable_bitmap[1].pixelRef()); 584 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1].pixelRef());
585 EXPECT_EQ(expected_rects[1].ToString(),
586 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
532 EXPECT_TRUE(++iterator); 587 EXPECT_TRUE(++iterator);
533 EXPECT_TRUE(*iterator == discardable_bitmap[2].pixelRef()); 588 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[2].pixelRef());
589 EXPECT_EQ(expected_rects[2].ToString(),
590 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
534 EXPECT_FALSE(++iterator); 591 EXPECT_FALSE(++iterator);
535 } 592 }
536 { 593 {
537 // Tile 2 should not include bitmap 0, which is only on tile 0 and the 594 // Tile 2 should not include bitmap 0, which is only on tile 0 and the
538 // borders of tile 1. 595 // borders of tile 1.
539 PicturePileImpl::PixelRefIterator iterator( 596 PicturePileImpl::PixelRefIterator iterator(
540 pile->tiling().TileBounds(2, 0), 1.f, pile.get()); 597 pile->tiling().TileBounds(2, 0), 1.f, pile.get());
541 EXPECT_TRUE(iterator); 598 EXPECT_TRUE(iterator);
542 EXPECT_TRUE(*iterator == discardable_bitmap[1].pixelRef()); 599 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[1].pixelRef());
600 EXPECT_EQ(expected_rects[1].ToString(),
601 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
543 EXPECT_TRUE(++iterator); 602 EXPECT_TRUE(++iterator);
544 EXPECT_TRUE(*iterator == discardable_bitmap[2].pixelRef()); 603 EXPECT_TRUE(iterator->pixel_ref == discardable_bitmap[2].pixelRef());
604 EXPECT_EQ(expected_rects[2].ToString(),
605 gfx::SkRectToRectF(iterator->pixel_ref_rect).ToString());
545 EXPECT_FALSE(++iterator); 606 EXPECT_FALSE(++iterator);
546 } 607 }
547 } 608 }
548 609
549 } // namespace 610 } // namespace
550 } // namespace cc 611 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/picture_pile_impl.cc ('k') | cc/playback/pixel_ref_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698