| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "TiledLayerChromium.h" | 9 #include "TiledLayerChromium.h" |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 int j = iter->key.second; | 208 int j = iter->key.second; |
| 209 UpdatableTile* tile = static_cast<UpdatableTile*>(iter->value.get()); | 209 UpdatableTile* tile = static_cast<UpdatableTile*>(iter->value.get()); |
| 210 #else | 210 #else |
| 211 int i = iter->first.first; | 211 int i = iter->first.first; |
| 212 int j = iter->first.second; | 212 int j = iter->first.second; |
| 213 UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get()); | 213 UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get()); |
| 214 #endif | 214 #endif |
| 215 // FIXME: This should not ever be null. | 215 // FIXME: This should not ever be null. |
| 216 if (!tile) | 216 if (!tile) |
| 217 continue; | 217 continue; |
| 218 |
| 218 tile->isInUseOnImpl = false; | 219 tile->isInUseOnImpl = false; |
| 220 |
| 219 if (!tile->managedTexture()->haveBackingTexture()) { | 221 if (!tile->managedTexture()->haveBackingTexture()) { |
| 222 // Evicted tiles get deleted from both layers |
| 220 invalidTiles.append(tile); | 223 invalidTiles.append(tile); |
| 221 continue; | 224 continue; |
| 222 } | 225 } |
| 223 if (!tile->validForFrame) | 226 |
| 227 if (!tile->validForFrame) { |
| 228 // Invalidated tiles are set so they can get different debug colors. |
| 229 tiledLayer->pushInvalidTile(i, j); |
| 224 continue; | 230 continue; |
| 231 } |
| 225 | 232 |
| 226 tiledLayer->pushTileProperties(i, j, tile->managedTexture()->resourceId(
), tile->opaqueRect()); | 233 tiledLayer->pushTileProperties(i, j, tile->managedTexture()->resourceId(
), tile->opaqueRect()); |
| 227 tile->isInUseOnImpl = true; | 234 tile->isInUseOnImpl = true; |
| 228 } | 235 } |
| 229 for (Vector<UpdatableTile*>::const_iterator iter = invalidTiles.begin(); ite
r != invalidTiles.end(); ++iter) | 236 for (Vector<UpdatableTile*>::const_iterator iter = invalidTiles.begin(); ite
r != invalidTiles.end(); ++iter) |
| 230 m_tiler->takeTile((*iter)->i(), (*iter)->j()); | 237 m_tiler->takeTile((*iter)->i(), (*iter)->j()); |
| 231 } | 238 } |
| 232 | 239 |
| 233 CCPrioritizedTextureManager* TiledLayerChromium::textureManager() const | 240 CCPrioritizedTextureManager* TiledLayerChromium::textureManager() const |
| 234 { | 241 { |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 prepaintRect.inflateX(m_tiler->tileSize().width()); | 809 prepaintRect.inflateX(m_tiler->tileSize().width()); |
| 803 prepaintRect.inflateY(m_tiler->tileSize().height() * 2); | 810 prepaintRect.inflateY(m_tiler->tileSize().height() * 2); |
| 804 IntRect contentRect(IntPoint::zero(), contentBounds()); | 811 IntRect contentRect(IntPoint::zero(), contentBounds()); |
| 805 prepaintRect.intersect(contentRect); | 812 prepaintRect.intersect(contentRect); |
| 806 | 813 |
| 807 return prepaintRect; | 814 return prepaintRect; |
| 808 } | 815 } |
| 809 | 816 |
| 810 } | 817 } |
| 811 #endif // USE(ACCELERATED_COMPOSITING) | 818 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |