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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |