OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 int commits_; | 1240 int commits_; |
1241 scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer_; | 1241 scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer_; |
1242 }; | 1242 }; |
1243 | 1243 |
1244 SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext); | 1244 SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext); |
1245 | 1245 |
1246 class UIResourceLostTest : public LayerTreeHostContextTest { | 1246 class UIResourceLostTest : public LayerTreeHostContextTest { |
1247 public: | 1247 public: |
1248 UIResourceLostTest() : time_step_(0) {} | 1248 UIResourceLostTest() : time_step_(0) {} |
1249 void InitializeSettings(LayerTreeSettings* settings) override { | 1249 void InitializeSettings(LayerTreeSettings* settings) override { |
1250 settings->texture_id_allocation_chunk_size = 1; | 1250 settings->renderer_settings.texture_id_allocation_chunk_size = 1; |
1251 } | 1251 } |
1252 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 1252 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
1253 void AfterTest() override {} | 1253 void AfterTest() override {} |
1254 | 1254 |
1255 // This is called on the main thread after each commit and | 1255 // This is called on the main thread after each commit and |
1256 // DidActivateTreeOnThread, with the value of time_step_ at the time | 1256 // DidActivateTreeOnThread, with the value of time_step_ at the time |
1257 // of the call to DidActivateTreeOnThread. Similar tests will do | 1257 // of the call to DidActivateTreeOnThread. Similar tests will do |
1258 // work on the main thread in DidCommit but that is unsuitable because | 1258 // work on the main thread in DidCommit but that is unsuitable because |
1259 // the main thread work for these tests must happen after | 1259 // the main thread work for these tests must happen after |
1260 // DidActivateTreeOnThread, which happens after DidCommit with impl-side | 1260 // DidActivateTreeOnThread, which happens after DidCommit with impl-side |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 void AfterTest() override {} | 1777 void AfterTest() override {} |
1778 | 1778 |
1779 bool deferred_; | 1779 bool deferred_; |
1780 }; | 1780 }; |
1781 | 1781 |
1782 SINGLE_AND_MULTI_THREAD_TEST_F( | 1782 SINGLE_AND_MULTI_THREAD_TEST_F( |
1783 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1783 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
1784 | 1784 |
1785 } // namespace | 1785 } // namespace |
1786 } // namespace cc | 1786 } // namespace cc |
OLD | NEW |