OLD | NEW |
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 picture_pile_->picture_map_.find(tile_iterator_.index()); | 439 picture_pile_->picture_map_.find(tile_iterator_.index()); |
440 if (it == picture_pile_->picture_map_.end()) | 440 if (it == picture_pile_->picture_map_.end()) |
441 continue; | 441 continue; |
442 | 442 |
443 const Picture* picture = it->second.GetPicture(); | 443 const Picture* picture = it->second.GetPicture(); |
444 if (!picture || (processed_pictures_.count(picture) != 0) || | 444 if (!picture || (processed_pictures_.count(picture) != 0) || |
445 !picture->WillPlayBackBitmaps()) | 445 !picture->WillPlayBackBitmaps()) |
446 continue; | 446 continue; |
447 | 447 |
448 processed_pictures_.insert(picture); | 448 processed_pictures_.insert(picture); |
449 pixel_ref_iterator_ = Picture::PixelRefIterator(layer_rect_, picture); | 449 pixel_ref_iterator_ = picture->GetPixelRefMapIterator(layer_rect_); |
450 if (pixel_ref_iterator_) | 450 if (pixel_ref_iterator_) |
451 break; | 451 break; |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 void PicturePileImpl::DidBeginTracing() { | 455 void PicturePileImpl::DidBeginTracing() { |
456 std::set<const void*> processed_pictures; | 456 std::set<const void*> processed_pictures; |
457 for (PictureMap::iterator it = picture_map_.begin(); | 457 for (PictureMap::iterator it = picture_map_.begin(); |
458 it != picture_map_.end(); | 458 it != picture_map_.end(); |
459 ++it) { | 459 ++it) { |
460 const Picture* picture = it->second.GetPicture(); | 460 const Picture* picture = it->second.GetPicture(); |
461 if (picture && (processed_pictures.count(picture) == 0)) { | 461 if (picture && (processed_pictures.count(picture) == 0)) { |
462 picture->EmitTraceSnapshot(); | 462 picture->EmitTraceSnapshot(); |
463 processed_pictures.insert(picture); | 463 processed_pictures.insert(picture); |
464 } | 464 } |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 } // namespace cc | 468 } // namespace cc |
OLD | NEW |