| 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 | 7 |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
| 10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 379 } |
| 380 | 380 |
| 381 void PicturePileImpl::PixelRefIterator::AdvanceToTilePictureWithPixelRefs() { | 381 void PicturePileImpl::PixelRefIterator::AdvanceToTilePictureWithPixelRefs() { |
| 382 for (; tile_iterator_; ++tile_iterator_) { | 382 for (; tile_iterator_; ++tile_iterator_) { |
| 383 PictureMap::const_iterator it = | 383 PictureMap::const_iterator it = |
| 384 picture_pile_->picture_map_.find(tile_iterator_.index()); | 384 picture_pile_->picture_map_.find(tile_iterator_.index()); |
| 385 if (it == picture_pile_->picture_map_.end()) | 385 if (it == picture_pile_->picture_map_.end()) |
| 386 continue; | 386 continue; |
| 387 | 387 |
| 388 const Picture* picture = it->second.GetPicture(); | 388 const Picture* picture = it->second.GetPicture(); |
| 389 if (!picture || (processed_pictures_.count(picture) != 0)) | 389 if (!picture || (processed_pictures_.count(picture) != 0) || |
| 390 !picture->WillPlayBackBitmaps()) |
| 390 continue; | 391 continue; |
| 391 | 392 |
| 392 processed_pictures_.insert(picture); | 393 processed_pictures_.insert(picture); |
| 393 pixel_ref_iterator_ = Picture::PixelRefIterator(layer_rect_, picture); | 394 pixel_ref_iterator_ = Picture::PixelRefIterator(layer_rect_, picture); |
| 394 if (pixel_ref_iterator_) | 395 if (pixel_ref_iterator_) |
| 395 break; | 396 break; |
| 396 } | 397 } |
| 397 } | 398 } |
| 398 | 399 |
| 399 void PicturePileImpl::DidBeginTracing() { | 400 void PicturePileImpl::DidBeginTracing() { |
| 400 gfx::Rect layer_rect(tiling_.total_size()); | 401 gfx::Rect layer_rect(tiling_.total_size()); |
| 401 std::set<void*> processed_pictures; | 402 std::set<void*> processed_pictures; |
| 402 for (PictureMap::iterator it = picture_map_.begin(); | 403 for (PictureMap::iterator it = picture_map_.begin(); |
| 403 it != picture_map_.end(); | 404 it != picture_map_.end(); |
| 404 ++it) { | 405 ++it) { |
| 405 Picture* picture = it->second.GetPicture(); | 406 Picture* picture = it->second.GetPicture(); |
| 406 if (picture && (processed_pictures.count(picture) == 0)) { | 407 if (picture && (processed_pictures.count(picture) == 0)) { |
| 407 picture->EmitTraceSnapshot(); | 408 picture->EmitTraceSnapshot(); |
| 408 processed_pictures.insert(picture); | 409 processed_pictures.insert(picture); |
| 409 } | 410 } |
| 410 } | 411 } |
| 411 } | 412 } |
| 412 | 413 |
| 413 } // namespace cc | 414 } // namespace cc |
| OLD | NEW |