OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/tiled_layer.h" | 5 #include "cc/tiled_layer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "cc/layer_impl.h" | 9 #include "cc/layer_impl.h" |
10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 tiledLayer->pushInvalidTile(i, j); | 212 tiledLayer->pushInvalidTile(i, j); |
213 continue; | 213 continue; |
214 } | 214 } |
215 | 215 |
216 tiledLayer->pushTileProperties(i, j, tile->managedResource()->resourceId
(), tile->opaqueRect(), tile->managedResource()->contentsSwizzled()); | 216 tiledLayer->pushTileProperties(i, j, tile->managedResource()->resourceId
(), tile->opaqueRect(), tile->managedResource()->contentsSwizzled()); |
217 } | 217 } |
218 for (std::vector<UpdatableTile*>::const_iterator iter = invalidTiles.begin()
; iter != invalidTiles.end(); ++iter) | 218 for (std::vector<UpdatableTile*>::const_iterator iter = invalidTiles.begin()
; iter != invalidTiles.end(); ++iter) |
219 m_tiler->takeTile((*iter)->i(), (*iter)->j()); | 219 m_tiler->takeTile((*iter)->i(), (*iter)->j()); |
220 } | 220 } |
221 | 221 |
| 222 bool TiledLayer::blocksPendingCommit() const |
| 223 { |
| 224 return true; |
| 225 } |
| 226 |
222 PrioritizedResourceManager* TiledLayer::resourceManager() const | 227 PrioritizedResourceManager* TiledLayer::resourceManager() const |
223 { | 228 { |
224 if (!layerTreeHost()) | 229 if (!layerTreeHost()) |
225 return 0; | 230 return 0; |
226 return layerTreeHost()->contentsTextureManager(); | 231 return layerTreeHost()->contentsTextureManager(); |
227 } | 232 } |
228 | 233 |
229 void TiledLayer::setLayerTreeHost(LayerTreeHost* host) | 234 void TiledLayer::setLayerTreeHost(LayerTreeHost* host) |
230 { | 235 { |
231 if (host && host != layerTreeHost()) { | 236 if (host && host != layerTreeHost()) { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 gfx::Rect prepaintRect = visibleContentRect(); | 757 gfx::Rect prepaintRect = visibleContentRect(); |
753 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, | 758 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, |
754 -m_tiler->tileSize().height() * prepaintRows); | 759 -m_tiler->tileSize().height() * prepaintRows); |
755 gfx::Rect contentRect(gfx::Point(), contentBounds()); | 760 gfx::Rect contentRect(gfx::Point(), contentBounds()); |
756 prepaintRect.Intersect(contentRect); | 761 prepaintRect.Intersect(contentRect); |
757 | 762 |
758 return prepaintRect; | 763 return prepaintRect; |
759 } | 764 } |
760 | 765 |
761 } // namespace cc | 766 } // namespace cc |
OLD | NEW |