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

Side by Side Diff: cc/resources/picture_pile_impl.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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/resources/picture_pile_impl.h ('k') | cc/resources/picture_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 #include <set> 7 #include <set>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 picture_pile_->picture_map_.find(tile_iterator_.index()); 448 picture_pile_->picture_map_.find(tile_iterator_.index());
449 if (it == picture_pile_->picture_map_.end()) 449 if (it == picture_pile_->picture_map_.end())
450 continue; 450 continue;
451 451
452 const Picture* picture = it->second.GetPicture(); 452 const Picture* picture = it->second.GetPicture();
453 if (!picture || (processed_pictures_.count(picture) != 0) || 453 if (!picture || (processed_pictures_.count(picture) != 0) ||
454 !picture->WillPlayBackBitmaps()) 454 !picture->WillPlayBackBitmaps())
455 continue; 455 continue;
456 456
457 processed_pictures_.insert(picture); 457 processed_pictures_.insert(picture);
458 pixel_ref_iterator_ = Picture::PixelRefIterator(layer_rect_, picture); 458 pixel_ref_iterator_ = picture->GetPixelRefMapIterator(layer_rect_);
459 if (pixel_ref_iterator_) 459 if (pixel_ref_iterator_)
460 break; 460 break;
461 } 461 }
462 } 462 }
463 463
464 void PicturePileImpl::DidBeginTracing() { 464 void PicturePileImpl::DidBeginTracing() {
465 std::set<const void*> processed_pictures; 465 std::set<const void*> processed_pictures;
466 for (const auto& map_pair : picture_map_) { 466 for (const auto& map_pair : picture_map_) {
467 const Picture* picture = map_pair.second.GetPicture(); 467 const Picture* picture = map_pair.second.GetPicture();
468 if (picture && (processed_pictures.count(picture) == 0)) { 468 if (picture && (processed_pictures.count(picture) == 0)) {
469 picture->EmitTraceSnapshot(); 469 picture->EmitTraceSnapshot();
470 processed_pictures.insert(picture); 470 processed_pictures.insert(picture);
471 } 471 }
472 } 472 }
473 } 473 }
474 474
475 } // namespace cc 475 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl.h ('k') | cc/resources/picture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698