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 #include "cc/tiled_layer.h" | 7 #include "cc/tiled_layer.h" |
8 | 8 |
9 #include "cc/bitmap_content_layer_updater.h" | 9 #include "cc/bitmap_content_layer_updater.h" |
10 #include "cc/layer_painter.h" | 10 #include "cc/layer_painter.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 FakeTiledLayerImpl* operator->() | 87 FakeTiledLayerImpl* operator->() |
88 { | 88 { |
89 return m_layerImpl; | 89 return m_layerImpl; |
90 } | 90 } |
91 private: | 91 private: |
92 FakeTiledLayerImpl* m_layerImpl; | 92 FakeTiledLayerImpl* m_layerImpl; |
93 }; | 93 }; |
94 void textureManagerClearAllMemory(PrioritizedTextureManager* textureManager,
ResourceProvider* resourceProvider) | 94 void textureManagerClearAllMemory(PrioritizedTextureManager* textureManager,
ResourceProvider* resourceProvider) |
95 { | 95 { |
96 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; | 96 { |
97 textureManager->clearAllMemory(resourceProvider); | 97 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThread
Blocked; |
98 textureManager->reduceMemory(resourceProvider); | 98 textureManager->clearAllMemory(resourceProvider); |
| 99 textureManager->reduceMemory(resourceProvider); |
| 100 } |
| 101 textureManager->unlinkAndClearEvictedBackings(); |
99 } | 102 } |
100 void updateTextures() | 103 void updateTextures() |
101 { | 104 { |
102 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; | 105 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; |
103 DCHECK(m_queue); | 106 DCHECK(m_queue); |
104 scoped_ptr<ResourceUpdateController> updateController = | 107 scoped_ptr<ResourceUpdateController> updateController = |
105 ResourceUpdateController::create( | 108 ResourceUpdateController::create( |
106 NULL, | 109 NULL, |
107 Proxy::implThread(), | 110 Proxy::implThread(), |
108 m_queue.Pass(), | 111 m_queue.Pass(), |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 updateTextures(); | 1622 updateTextures(); |
1620 | 1623 |
1621 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. | 1624 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. |
1622 layer->setNeedsDisplayRect(layerRect); | 1625 layer->setNeedsDisplayRect(layerRect); |
1623 layer->update(*m_queue.get(), 0, m_stats); | 1626 layer->update(*m_queue.get(), 0, m_stats); |
1624 | 1627 |
1625 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); | 1628 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); |
1626 } | 1629 } |
1627 | 1630 |
1628 } // namespace | 1631 } // namespace |
OLD | NEW |