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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 picture_pile_->picture_map_.find(tile_iterator_.index()); | 420 picture_pile_->picture_map_.find(tile_iterator_.index()); |
421 if (it == picture_pile_->picture_map_.end()) | 421 if (it == picture_pile_->picture_map_.end()) |
422 continue; | 422 continue; |
423 | 423 |
424 const Picture* picture = it->second.GetPicture(); | 424 const Picture* picture = it->second.GetPicture(); |
425 if (!picture || (processed_pictures_.count(picture) != 0) || | 425 if (!picture || (processed_pictures_.count(picture) != 0) || |
426 !picture->WillPlayBackBitmaps()) | 426 !picture->WillPlayBackBitmaps()) |
427 continue; | 427 continue; |
428 | 428 |
429 processed_pictures_.insert(picture); | 429 processed_pictures_.insert(picture); |
430 pixel_ref_iterator_ = Picture::PixelRefIterator(layer_rect_, picture); | 430 pixel_ref_iterator_ = picture->GetPixelRefMapIterator(layer_rect_); |
431 if (pixel_ref_iterator_) | 431 if (pixel_ref_iterator_) |
432 break; | 432 break; |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 void PicturePileImpl::DidBeginTracing() { | 436 void PicturePileImpl::DidBeginTracing() { |
437 std::set<const void*> processed_pictures; | 437 std::set<const void*> processed_pictures; |
438 for (const auto& map_pair : picture_map_) { | 438 for (const auto& map_pair : picture_map_) { |
439 const Picture* picture = map_pair.second.GetPicture(); | 439 const Picture* picture = map_pair.second.GetPicture(); |
440 if (picture && (processed_pictures.count(picture) == 0)) { | 440 if (picture && (processed_pictures.count(picture) == 0)) { |
441 picture->EmitTraceSnapshot(); | 441 picture->EmitTraceSnapshot(); |
442 processed_pictures.insert(picture); | 442 processed_pictures.insert(picture); |
443 } | 443 } |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 } // namespace cc | 447 } // namespace cc |
OLD | NEW |