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