Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: cc/tiled_layer_unittest.cc

Issue 11280268: Merge 170403 - Use a lock to deal with concurrent access to the m_evictedBackings (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/thread_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698