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

Side by Side Diff: cc/layer_tree_host_unittest.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply code review comments Created 8 years, 1 month 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
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/layer_tree_host.h" 7 #include "cc/layer_tree_host.h"
8 8
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/content_layer.h" 10 #include "cc/content_layer.h"
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 2851
2852 postSetNeedsCommitToMainThread(); 2852 postSetNeedsCommitToMainThread();
2853 } 2853 }
2854 2854
2855 void postEvictTextures() 2855 void postEvictTextures()
2856 { 2856 {
2857 if (implThread()) { 2857 if (implThread()) {
2858 implThread()->postTask(base::Bind(&LayerTreeHostTestLostContextAfter EvictTextures::evictTexturesOnImplThread, 2858 implThread()->postTask(base::Bind(&LayerTreeHostTestLostContextAfter EvictTextures::evictTexturesOnImplThread,
2859 base::Unretained(this))); 2859 base::Unretained(this)));
2860 } else { 2860 } else {
2861 DebugScopedSetImplThread impl; 2861 DebugScopedSetImplThread impl(proxy());
2862 evictTexturesOnImplThread(); 2862 evictTexturesOnImplThread();
2863 } 2863 }
2864 } 2864 }
2865 2865
2866 void evictTexturesOnImplThread() 2866 void evictTexturesOnImplThread()
2867 { 2867 {
2868 DCHECK(m_implForEvictTextures); 2868 DCHECK(m_implForEvictTextures);
2869 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0 )); 2869 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0 ));
2870 } 2870 }
2871 2871
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
3221 int m_numCommitsDeferred; 3221 int m_numCommitsDeferred;
3222 int m_numCompleteCommits; 3222 int m_numCompleteCommits;
3223 }; 3223 };
3224 3224
3225 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) 3225 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread)
3226 { 3226 {
3227 runTest(true); 3227 runTest(true);
3228 } 3228 }
3229 3229
3230 } // namespace 3230 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698