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

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

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/fake_channel_impl.h" 5 #include "cc/test/fake_channel_impl.h"
6 #include "cc/test/fake_layer_tree_host.h" 6 #include "cc/test/fake_layer_tree_host.h"
7 #include "cc/test/fake_layer_tree_host_client.h" 7 #include "cc/test/fake_layer_tree_host_client.h"
8 #include "cc/test/proxy_impl_for_test.h" 8 #include "cc/test/proxy_impl_for_test.h"
9 #include "cc/test/test_hooks.h" 9 #include "cc/test/test_hooks.h"
10 #include "cc/test/test_task_graph_runner.h" 10 #include "cc/test/test_task_graph_runner.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class ProxyImplTest : public testing::Test, public TestHooks { 15 class ProxyImplTest : public testing::Test, public TestHooks {
16 public: 16 public:
17 ~ProxyImplTest() override { 17 ~ProxyImplTest() override {
18 DebugScopedSetImplThreadAndMainThreadBlocked impl_and_main_blocked( 18 DebugScopedSetImplThreadAndMainThreadBlocked impl_and_main_blocked(
19 task_runner_provider_); 19 task_runner_provider_);
20 proxy_impl_.reset(); 20 proxy_impl_.reset();
21 } 21 }
22 22
23 void RequestNewOutputSurface() override {} 23 void RequestNewOutputSurface() override {}
24 void DidShutdown() override {}
24 25
25 protected: 26 protected:
26 ProxyImplTest() 27 ProxyImplTest()
27 : host_client_(FakeLayerTreeHostClient::DIRECT_3D), 28 : host_client_(FakeLayerTreeHostClient::DIRECT_3D),
28 task_runner_provider_(nullptr) {} 29 task_runner_provider_(nullptr) {}
29 30
30 void Initialize(CompositorMode mode) { 31 void Initialize(CompositorMode mode) {
31 layer_tree_host_ = FakeLayerTreeHost::Create( 32 layer_tree_host_ = FakeLayerTreeHost::Create(
32 &host_client_, &task_graph_runner_, settings_, mode); 33 &host_client_, &task_graph_runner_, settings_, mode);
33 task_runner_provider_ = layer_tree_host_->task_runner_provider(); 34 task_runner_provider_ = layer_tree_host_->task_runner_provider();
(...skipping 17 matching lines...) Expand all
51 52
52 // This is a regression test. See crbug/568120. 53 // This is a regression test. See crbug/568120.
53 TEST_F(ProxyImplTest, NonZeroSmoothnessPriorityExpiration) { 54 TEST_F(ProxyImplTest, NonZeroSmoothnessPriorityExpiration) {
54 Initialize(CompositorMode::Threaded); 55 Initialize(CompositorMode::Threaded);
55 DebugScopedSetImplThread impl_thread(task_runner_provider_); 56 DebugScopedSetImplThread impl_thread(task_runner_provider_);
56 EXPECT_FALSE( 57 EXPECT_FALSE(
57 proxy_impl_->smoothness_priority_expiration_notifier().delay().is_zero()); 58 proxy_impl_->smoothness_priority_expiration_notifier().delay().is_zero());
58 } 59 }
59 60
60 } // namespace cc 61 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698