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

Side by Side Diff: cc/tiled_layer_unittest.cc

Issue 11411251: Use a lock to deal with concurrent access to the m_evictedBackings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make lock mutable 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 "cc/tiled_layer.h" 5 #include "cc/tiled_layer.h"
6 6
7 #include "cc/bitmap_content_layer_updater.h" 7 #include "cc/bitmap_content_layer_updater.h"
8 #include "cc/layer_painter.h" 8 #include "cc/layer_painter.h"
9 #include "cc/overdraw_metrics.h" 9 #include "cc/overdraw_metrics.h"
10 #include "cc/rendering_stats.h" 10 #include "cc/rendering_stats.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 FakeTiledLayerImpl* operator->() 88 FakeTiledLayerImpl* operator->()
89 { 89 {
90 return m_layerImpl; 90 return m_layerImpl;
91 } 91 }
92 private: 92 private:
93 FakeTiledLayerImpl* m_layerImpl; 93 FakeTiledLayerImpl* m_layerImpl;
94 }; 94 };
95 void resourceManagerClearAllMemory(PrioritizedResourceManager* resourceManag er, ResourceProvider* resourceProvider) 95 void resourceManagerClearAllMemory(PrioritizedResourceManager* resourceManag er, ResourceProvider* resourceProvider)
96 { 96 {
97 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc ked(m_proxy); 97 {
98 resourceManager->clearAllMemory(resourceProvider); 98 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThread Blocked(m_proxy);
99 resourceManager->reduceMemory(resourceProvider); 99 resourceManager->clearAllMemory(resourceProvider);
100 resourceManager->reduceMemory(resourceProvider);
101 }
102 resourceManager->unlinkAndClearEvictedBackings();
100 } 103 }
101 void updateTextures() 104 void updateTextures()
102 { 105 {
103 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc ked(m_proxy); 106 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc ked(m_proxy);
104 DCHECK(m_queue); 107 DCHECK(m_queue);
105 scoped_ptr<ResourceUpdateController> updateController = 108 scoped_ptr<ResourceUpdateController> updateController =
106 ResourceUpdateController::create( 109 ResourceUpdateController::create(
107 NULL, 110 NULL,
108 m_proxy->implThread(), 111 m_proxy->implThread(),
109 m_queue.Pass(), 112 m_queue.Pass(),
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 1622
1620 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds. 1623 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds.
1621 layer->setNeedsDisplayRect(layerRect); 1624 layer->setNeedsDisplayRect(layerRect);
1622 layer->update(*m_queue.get(), 0, m_stats); 1625 layer->update(*m_queue.get(), 0, m_stats);
1623 1626
1624 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); 1627 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
1625 } 1628 }
1626 1629
1627 } // namespace 1630 } // namespace
1628 } // namespace cc 1631 } // namespace cc
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