Chromium Code Reviews| Index: cc/resources/picture_layer_tiling.cc |
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc |
| index 5c971047aa70142b7a65ca1687e28455a49b0ca0..be13de54e8908787b300be598e117b4558260cd7 100644 |
| --- a/cc/resources/picture_layer_tiling.cc |
| +++ b/cc/resources/picture_layer_tiling.cc |
| @@ -209,7 +209,7 @@ void PictureLayerTiling::UpdateTilesToCurrentPile( |
| } |
| // There is no recycled twin since this is run on the pending tiling. |
| - PictureLayerTiling* recycled_twin = NULL; |
| + PictureLayerTiling* recycled_twin = nullptr; |
| DCHECK_EQ(recycled_twin, client_->GetRecycledTwinTiling(this)); |
| DCHECK_EQ(PENDING_TREE, client_->GetTree()); |
| @@ -290,7 +290,7 @@ void PictureLayerTiling::DoInvalidate(const Region& layer_region, |
| iter; |
| ++iter) { |
| // There is no recycled twin since this is run on the pending tiling. |
| - PictureLayerTiling* recycled_twin = NULL; |
| + PictureLayerTiling* recycled_twin = nullptr; |
| DCHECK_EQ(recycled_twin, client_->GetRecycledTwinTiling(this)); |
| DCHECK_EQ(PENDING_TREE, client_->GetTree()); |
| if (RemoveTileAt(iter.index_x(), iter.index_y(), recycled_twin)) |
| @@ -302,15 +302,15 @@ void PictureLayerTiling::DoInvalidate(const Region& layer_region, |
| for (size_t i = 0; i < new_tile_keys.size(); ++i) { |
| // Don't try to share a tile with the twin layer, it's been invalidated so |
| // we have to make our own tile here. |
| - const PictureLayerTiling* twin_tiling = NULL; |
| + const PictureLayerTiling* twin_tiling = nullptr; |
| CreateTile(new_tile_keys[i].first, new_tile_keys[i].second, twin_tiling); |
| } |
| } |
| } |
| PictureLayerTiling::CoverageIterator::CoverageIterator() |
| - : tiling_(NULL), |
| - current_tile_(NULL), |
| + : tiling_(nullptr), |
| + current_tile_(nullptr), |
| tile_i_(0), |
| tile_j_(0), |
| left_(0), |
| @@ -326,7 +326,7 @@ PictureLayerTiling::CoverageIterator::CoverageIterator( |
| : tiling_(tiling), |
| dest_rect_(dest_rect), |
| dest_to_content_scale_(0), |
| - current_tile_(NULL), |
| + current_tile_(nullptr), |
| tile_i_(0), |
| tile_j_(0), |
| left_(0), |
| @@ -377,7 +377,7 @@ PictureLayerTiling::CoverageIterator::operator++() { |
| tile_j_++; |
| new_row = true; |
| if (tile_j_ > bottom_) { |
| - current_tile_ = NULL; |
| + current_tile_ = nullptr; |
| return *this; |
| } |
| } |
| @@ -467,8 +467,8 @@ bool PictureLayerTiling::RemoveTileAt(int i, |
| found->second->set_shared(false); |
| tiles_.erase(found); |
| if (recycled_twin) { |
| - // Recycled twin does not also have a recycled twin, so pass NULL. |
| - recycled_twin->RemoveTileAt(i, j, NULL); |
| + // Recycled twin does not also have a recycled twin, so pass nullptr. |
|
danakj
2014/10/10 17:28:45
just use null
|
| + recycled_twin->RemoveTileAt(i, j, nullptr); |
| } |
| return true; |
| } |
| @@ -479,7 +479,7 @@ void PictureLayerTiling::Reset() { |
| for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { |
| it->second->set_shared(false); |
| if (recycled_twin) |
| - recycled_twin->RemoveTileAt(it->first.first, it->first.second, NULL); |
| + recycled_twin->RemoveTileAt(it->first.first, it->first.second, nullptr); |
| } |
| tiles_.clear(); |
| } |
| @@ -1051,11 +1051,12 @@ const std::vector<Tile*>* PictureLayerTiling::GetEvictionTiles( |
| } |
| PictureLayerTiling::TilingRasterTileIterator::TilingRasterTileIterator() |
| - : tiling_(NULL), current_tile_(NULL) {} |
| + : tiling_(nullptr), current_tile_(nullptr) { |
| +} |
| PictureLayerTiling::TilingRasterTileIterator::TilingRasterTileIterator( |
| PictureLayerTiling* tiling) |
| - : tiling_(tiling), phase_(VISIBLE_RECT), current_tile_(NULL) { |
| + : tiling_(tiling), phase_(VISIBLE_RECT), current_tile_(nullptr) { |
| if (!tiling_->has_visible_rect_tiles_) { |
| AdvancePhase(); |
| return; |
| @@ -1111,7 +1112,7 @@ void PictureLayerTiling::TilingRasterTileIterator::AdvancePhase() { |
| break; |
| case EVENTUALLY_RECT: |
| if (!tiling_->has_eventually_rect_tiles_) { |
| - current_tile_ = NULL; |
| + current_tile_ = nullptr; |
| return; |
| } |
| @@ -1132,7 +1133,7 @@ void PictureLayerTiling::TilingRasterTileIterator::AdvancePhase() { |
| } |
| if (!spiral_iterator_ && phase_ == EVENTUALLY_RECT) { |
| - current_tile_ = NULL; |
| + current_tile_ = nullptr; |
| break; |
| } |
| } while (!spiral_iterator_); |
| @@ -1144,7 +1145,7 @@ void PictureLayerTiling::TilingRasterTileIterator::AdvancePhase() { |
| PictureLayerTiling::TilingRasterTileIterator& |
| PictureLayerTiling::TilingRasterTileIterator:: |
| operator++() { |
| - current_tile_ = NULL; |
| + current_tile_ = nullptr; |
| while (!current_tile_ || !TileNeedsRaster(current_tile_)) { |
| std::pair<int, int> next_index; |
| switch (phase_) { |
| @@ -1168,7 +1169,7 @@ operator++() { |
| case EVENTUALLY_RECT: |
| ++spiral_iterator_; |
| if (!spiral_iterator_) { |
| - current_tile_ = NULL; |
| + current_tile_ = nullptr; |
| return *this; |
| } |
| next_index = spiral_iterator_.index(); |
| @@ -1183,7 +1184,7 @@ operator++() { |
| } |
| PictureLayerTiling::TilingEvictionTileIterator::TilingEvictionTileIterator() |
| - : eviction_tiles_(NULL), current_eviction_tiles_index_(0u) { |
| + : eviction_tiles_(nullptr), current_eviction_tiles_index_(0u) { |
| } |
| PictureLayerTiling::TilingEvictionTileIterator::TilingEvictionTileIterator( |