Chromium Code Reviews| Index: cc/resources/picture_pile_impl.cc |
| diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc |
| index 9c68137f6510691fa2dce11f4dcafba91798d046..ee942a6398f9571fcbfe47543bad2d8992981035 100644 |
| --- a/cc/resources/picture_pile_impl.cc |
| +++ b/cc/resources/picture_pile_impl.cc |
| @@ -135,8 +135,7 @@ void PicturePileImpl::CoalesceRasters(const gfx::Rect& canvas_rect, |
| PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index()); |
| if (map_iter == picture_map_.end()) |
| continue; |
| - const PictureInfo& info = map_iter->second; |
| - const Picture* picture = info.GetPicture(); |
| + const Picture* picture = map_iter->second.get(); |
| if (!picture) |
|
vmpstr
2015/04/07 17:43:14
This can be removed
|
| continue; |
| @@ -269,7 +268,7 @@ size_t PicturePileImpl::GetPictureMemoryUsage() const { |
| size_t total_size = 0; |
| std::set<const Picture*> pictures_seen; |
| for (const auto& map_value : picture_map_) { |
| - const Picture* picture = map_value.second.GetPicture(); |
| + const Picture* picture = map_value.second.get(); |
| if (picture && pictures_seen.insert(picture).second) |
|
vmpstr
2015/04/07 17:43:14
"picture &&" can be removed, or DCHECKed
|
| total_size += picture->ApproximateMemoryUsage(); |
| } |
| @@ -357,7 +356,7 @@ bool PicturePileImpl::CanRasterSlowTileCheck( |
| PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index()); |
| if (map_iter == picture_map_.end()) |
| return false; |
| - if (!map_iter->second.GetPicture()) |
| + if (!map_iter->second.get()) |
|
vmpstr
2015/04/07 17:43:14
This can also be removed?
|
| return false; |
| } |
| return true; |
| @@ -382,7 +381,7 @@ void PicturePileImpl::AsValueInto( |
| if (map_iter == picture_map_.end()) |
| continue; |
| - const Picture* picture = map_iter->second.GetPicture(); |
| + const Picture* picture = map_iter->second.get(); |
| if (picture && (appended_pictures.count(picture) == 0)) { |
|
vmpstr
2015/04/07 17:43:14
Here as well.
|
| appended_pictures.insert(picture); |
| TracedValue::AppendIDRef(picture, pictures); |
| @@ -439,7 +438,7 @@ void PicturePileImpl::PixelRefIterator::AdvanceToTilePictureWithPixelRefs() { |
| if (it == picture_pile_->picture_map_.end()) |
| continue; |
| - const Picture* picture = it->second.GetPicture(); |
| + const Picture* picture = it->second.get(); |
| if (!picture || (processed_pictures_.count(picture) != 0) || |
|
vmpstr
2015/04/07 17:43:14
Here as well.
|
| !picture->WillPlayBackBitmaps()) |
| continue; |
| @@ -454,7 +453,7 @@ void PicturePileImpl::PixelRefIterator::AdvanceToTilePictureWithPixelRefs() { |
| void PicturePileImpl::DidBeginTracing() { |
| std::set<const void*> processed_pictures; |
| for (const auto& map_pair : picture_map_) { |
| - const Picture* picture = map_pair.second.GetPicture(); |
| + const Picture* picture = map_pair.second.get(); |
| if (picture && (processed_pictures.count(picture) == 0)) { |
|
vmpstr
2015/04/07 17:43:14
Here as well.
|
| picture->EmitTraceSnapshot(); |
| processed_pictures.insert(picture); |