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 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2855 | 2855 |
2856 postSetNeedsCommitToMainThread(); | 2856 postSetNeedsCommitToMainThread(); |
2857 } | 2857 } |
2858 | 2858 |
2859 void postEvictTextures() | 2859 void postEvictTextures() |
2860 { | 2860 { |
2861 if (implThread()) { | 2861 if (implThread()) { |
2862 implThread()->postTask(base::Bind(&LayerTreeHostTestLostContextAfter
EvictTextures::evictTexturesOnImplThread, | 2862 implThread()->postTask(base::Bind(&LayerTreeHostTestLostContextAfter
EvictTextures::evictTexturesOnImplThread, |
2863 base::Unretained(this))); | 2863 base::Unretained(this))); |
2864 } else { | 2864 } else { |
2865 DebugScopedSetImplThread impl; | 2865 DebugScopedSetImplThread impl(proxy()); |
2866 evictTexturesOnImplThread(); | 2866 evictTexturesOnImplThread(); |
2867 } | 2867 } |
2868 } | 2868 } |
2869 | 2869 |
2870 void evictTexturesOnImplThread() | 2870 void evictTexturesOnImplThread() |
2871 { | 2871 { |
2872 DCHECK(m_implForEvictTextures); | 2872 DCHECK(m_implForEvictTextures); |
2873 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0
)); | 2873 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0
)); |
2874 } | 2874 } |
2875 | 2875 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3265 int m_numCommitsDeferred; | 3265 int m_numCommitsDeferred; |
3266 int m_numCompleteCommits; | 3266 int m_numCompleteCommits; |
3267 }; | 3267 }; |
3268 | 3268 |
3269 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) | 3269 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) |
3270 { | 3270 { |
3271 runTest(true); | 3271 runTest(true); |
3272 } | 3272 } |
3273 | 3273 |
3274 } // anonymous namespace | 3274 } // anonymous namespace |
OLD | NEW |