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 "cc/resources/picture_layer_tiling.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 // Create a new tile because our twin didn't have a valid one. | 118 // Create a new tile because our twin didn't have a valid one. |
119 scoped_refptr<Tile> tile = client_->CreateTile(this, tile_rect); | 119 scoped_refptr<Tile> tile = client_->CreateTile(this, tile_rect); |
120 if (tile.get()) | 120 if (tile.get()) |
121 tiles_[key] = tile; | 121 tiles_[key] = tile; |
122 return tile.get(); | 122 return tile.get(); |
123 } | 123 } |
124 | 124 |
125 Region PictureLayerTiling::OpaqueRegionInContentRect( | |
126 const gfx::Rect& content_rect) const { | |
127 Region opaque_region; | |
128 // TODO(enne): implement me | |
129 return opaque_region; | |
130 } | |
131 | |
132 void PictureLayerTiling::SetCanUseLCDText(bool can_use_lcd_text) { | 125 void PictureLayerTiling::SetCanUseLCDText(bool can_use_lcd_text) { |
133 for (TileMap::iterator it = tiles_.begin(); it != tiles_.end(); ++it) | 126 for (TileMap::iterator it = tiles_.begin(); it != tiles_.end(); ++it) |
134 it->second->set_can_use_lcd_text(can_use_lcd_text); | 127 it->second->set_can_use_lcd_text(can_use_lcd_text); |
135 } | 128 } |
136 | 129 |
137 void PictureLayerTiling::CreateMissingTilesInLiveTilesRect() { | 130 void PictureLayerTiling::CreateMissingTilesInLiveTilesRect() { |
138 const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this); | 131 const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this); |
139 bool include_borders = true; | 132 bool include_borders = true; |
140 for (TilingData::Iterator iter( | 133 for (TilingData::Iterator iter( |
141 &tiling_data_, live_tiles_rect_, include_borders); | 134 &tiling_data_, live_tiles_rect_, include_borders); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 tiling_->UpdateEvictionCacheIfNeeded(tree_priority_); | 955 tiling_->UpdateEvictionCacheIfNeeded(tree_priority_); |
963 tile_iterator_ = tiling_->eviction_tiles_cache_.begin(); | 956 tile_iterator_ = tiling_->eviction_tiles_cache_.begin(); |
964 is_valid_ = true; | 957 is_valid_ = true; |
965 if (tile_iterator_ != tiling_->eviction_tiles_cache_.end() && | 958 if (tile_iterator_ != tiling_->eviction_tiles_cache_.end() && |
966 !(*tile_iterator_)->HasResources()) { | 959 !(*tile_iterator_)->HasResources()) { |
967 ++(*this); | 960 ++(*this); |
968 } | 961 } |
969 } | 962 } |
970 | 963 |
971 } // namespace cc | 964 } // namespace cc |
OLD | NEW |