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 "CCGraphicsContext.h" | 9 #include "CCGraphicsContext.h" |
10 #include "CCThreadedTest.h" | 10 #include "CCThreadedTest.h" |
(...skipping 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2860 | 2860 |
2861 private: | 2861 private: |
2862 LayerTreeHostTestLostContextAfterEvictTextures* m_test; | 2862 LayerTreeHostTestLostContextAfterEvictTextures* m_test; |
2863 }; | 2863 }; |
2864 | 2864 |
2865 void postEvictTextures() | 2865 void postEvictTextures() |
2866 { | 2866 { |
2867 if (webThread()) | 2867 if (webThread()) |
2868 webThread()->postTask(new EvictTexturesTask(this)); | 2868 webThread()->postTask(new EvictTexturesTask(this)); |
2869 else { | 2869 else { |
2870 DebugScopedSetImplThread impl; | 2870 DebugScopedSetImplThread impl(proxy()); |
2871 evictTexturesOnImplThread(); | 2871 evictTexturesOnImplThread(); |
2872 } | 2872 } |
2873 } | 2873 } |
2874 | 2874 |
2875 void evictTexturesOnImplThread() | 2875 void evictTexturesOnImplThread() |
2876 { | 2876 { |
2877 DCHECK(m_implForEvictTextures); | 2877 DCHECK(m_implForEvictTextures); |
2878 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0
)); | 2878 m_implForEvictTextures->enforceManagedMemoryPolicy(ManagedMemoryPolicy(0
)); |
2879 } | 2879 } |
2880 | 2880 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3177 int m_numCommitComplete; | 3177 int m_numCommitComplete; |
3178 int m_numDrawLayers; | 3178 int m_numDrawLayers; |
3179 }; | 3179 }; |
3180 | 3180 |
3181 TEST_F(LayerTreeHostTestContinuousAnimate, runMultiThread) | 3181 TEST_F(LayerTreeHostTestContinuousAnimate, runMultiThread) |
3182 { | 3182 { |
3183 runTest(true); | 3183 runTest(true); |
3184 } | 3184 } |
3185 | 3185 |
3186 } // namespace | 3186 } // namespace |
OLD | NEW |