Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1356463002: Revert of cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 457
458 private: 458 private:
459 class MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface 459 class MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface
460 : public FakeOutputSurface { 460 : public FakeOutputSurface {
461 public: 461 public:
462 ~MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface() {} 462 ~MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface() {}
463 explicit MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface( 463 explicit MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface(
464 bool delegated_rendering) 464 bool delegated_rendering)
465 : FakeOutputSurface(TestContextProvider::Create(), 465 : FakeOutputSurface(TestContextProvider::Create(),
466 TestContextProvider::CreateWorker(), 466 TestContextProvider::Create(),
467 delegated_rendering) {} 467 delegated_rendering) {}
468 MOCK_METHOD1(SetWorkerContextShouldAggressivelyFreeResources, 468 MOCK_METHOD1(SetWorkerContextShouldAggressivelyFreeResources,
469 void(bool is_visible)); 469 void(bool is_visible));
470 }; 470 };
471 }; 471 };
472 472
473 // Test if the LTH successfully frees resources on the worker context when 473 // Test if the LTH successfully frees resources on the worker context when
474 // visibility is set to false. 474 // visibility is set to false.
475 class LayerTreeHostFreeWorkerContextResourcesOnInvisible 475 class LayerTreeHostFreeWorkerContextResourcesOnInvisible
476 : public LayerTreeHostFreeWorkerContextResourcesTest { 476 : public LayerTreeHostFreeWorkerContextResourcesTest {
(...skipping 5690 matching lines...) Expand 10 before | Expand all | Expand 10 after
6167 6167
6168 ScrollAndScaleSet scroll_info_; 6168 ScrollAndScaleSet scroll_info_;
6169 ScrollAndScaleSet scale_info_; 6169 ScrollAndScaleSet scale_info_;
6170 ScrollAndScaleSet no_op_info_; 6170 ScrollAndScaleSet no_op_info_;
6171 bool requested_update_layers_; 6171 bool requested_update_layers_;
6172 int commit_count_; 6172 int commit_count_;
6173 }; 6173 };
6174 6174
6175 MULTI_THREAD_TEST_F(LayerTreeHostScrollingAndScalingUpdatesLayers); 6175 MULTI_THREAD_TEST_F(LayerTreeHostScrollingAndScalingUpdatesLayers);
6176 6176
6177 class LayerTreeHostTestDestroyWhileInitializingOutputSurface
6178 : public LayerTreeHostTest {
6179 protected:
6180 void BeginTest() override {
6181 // By ending the test immediately we start initialization of an output
6182 // surface but destroy the LTH before it completes. This test verifies
6183 // that this works correctly and the output surface is destroyed on
6184 // the correct thread.
6185 EndTest();
6186 }
6187
6188 void AfterTest() override {}
6189 };
6190
6191 MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface);
6192
6193 } // namespace 6177 } // namespace
6194 } // namespace cc 6178 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698