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

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

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "cc/test/fake_content_layer_client.h" 7 #include "cc/test/fake_content_layer_client.h"
8 #include "cc/test/fake_picture_layer.h" 8 #include "cc/test/fake_picture_layer.h"
9 #include "cc/test/layer_tree_test.h" 9 #include "cc/test/layer_tree_test.h"
10 #include "cc/trees/thread_proxy.h" 10 #include "cc/trees/thread_proxy.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 : update_check_layer_( 77 : update_check_layer_(
78 FakePictureLayer::Create(layer_settings(), &client_)) {} 78 FakePictureLayer::Create(layer_settings(), &client_)) {}
79 ~ThreadProxyTest() override {} 79 ~ThreadProxyTest() override {}
80 80
81 void SetupTree() override { 81 void SetupTree() override {
82 layer_tree_host()->SetRootLayer(update_check_layer_); 82 layer_tree_host()->SetRootLayer(update_check_layer_);
83 ProxyTest::SetupTree(); 83 ProxyTest::SetupTree();
84 } 84 }
85 85
86 const ThreadProxy::MainThreadOnly& ThreadProxyMainOnly() const { 86 const ThreadProxy::MainThreadOnly& ThreadProxyMainOnly() const {
87 DCHECK(task_runner_provider());
88 DCHECK(task_runner_provider()->HasImplThread());
87 DCHECK(proxy()); 89 DCHECK(proxy());
88 DCHECK(proxy()->HasImplThread());
89 return static_cast<const ThreadProxy*>(proxy())->main(); 90 return static_cast<const ThreadProxy*>(proxy())->main();
90 } 91 }
91 92
92 const ThreadProxy::CompositorThreadOnly& ThreadProxyImplOnly() const { 93 const ThreadProxy::CompositorThreadOnly& ThreadProxyImplOnly() const {
94 DCHECK(task_runner_provider());
95 DCHECK(task_runner_provider()->HasImplThread());
93 DCHECK(proxy()); 96 DCHECK(proxy());
94 DCHECK(proxy()->HasImplThread());
95 return static_cast<const ThreadProxy*>(proxy())->impl(); 97 return static_cast<const ThreadProxy*>(proxy())->impl();
96 } 98 }
97 99
98 protected: 100 protected:
99 FakeContentLayerClient client_; 101 FakeContentLayerClient client_;
100 scoped_refptr<FakePictureLayer> update_check_layer_; 102 scoped_refptr<FakePictureLayer> update_check_layer_;
101 103
102 private: 104 private:
103 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTest); 105 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTest);
104 }; 106 };
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 345
344 private: 346 private:
345 int commits_completed_; 347 int commits_completed_;
346 348
347 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTestCommitWaitsForActivation); 349 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTestCommitWaitsForActivation);
348 }; 350 };
349 351
350 THREAD_PROXY_TEST_F(ThreadProxyTestCommitWaitsForActivation); 352 THREAD_PROXY_TEST_F(ThreadProxyTestCommitWaitsForActivation);
351 353
352 } // namespace cc 354 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_copyrequest.cc ('k') | cc/trees/occlusion_tracker_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698