| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |