| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 class ThreadProxyTest : public ProxyTest { | 74 class ThreadProxyTest : public ProxyTest { |
| 75 protected: | 75 protected: |
| 76 ThreadProxyTest() | 76 ThreadProxyTest() |
| 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 client_.set_bounds(update_check_layer_->bounds()); |
| 84 } | 85 } |
| 85 | 86 |
| 86 const ThreadProxy::MainThreadOnly& ThreadProxyMainOnly() const { | 87 const ThreadProxy::MainThreadOnly& ThreadProxyMainOnly() const { |
| 87 DCHECK(task_runner_provider()); | 88 DCHECK(task_runner_provider()); |
| 88 DCHECK(task_runner_provider()->HasImplThread()); | 89 DCHECK(task_runner_provider()->HasImplThread()); |
| 89 DCHECK(proxy()); | 90 DCHECK(proxy()); |
| 90 return static_cast<const ThreadProxy*>(proxy())->main(); | 91 return static_cast<const ThreadProxy*>(proxy())->main(); |
| 91 } | 92 } |
| 92 | 93 |
| 93 const ThreadProxy::CompositorThreadOnly& ThreadProxyImplOnly() const { | 94 const ThreadProxy::CompositorThreadOnly& ThreadProxyImplOnly() const { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 346 |
| 346 private: | 347 private: |
| 347 int commits_completed_; | 348 int commits_completed_; |
| 348 | 349 |
| 349 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTestCommitWaitsForActivation); | 350 DISALLOW_COPY_AND_ASSIGN(ThreadProxyTestCommitWaitsForActivation); |
| 350 }; | 351 }; |
| 351 | 352 |
| 352 THREAD_PROXY_TEST_F(ThreadProxyTestCommitWaitsForActivation); | 353 THREAD_PROXY_TEST_F(ThreadProxyTestCommitWaitsForActivation); |
| 353 | 354 |
| 354 } // namespace cc | 355 } // namespace cc |
| OLD | NEW |