OLD | NEW |
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/test/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 proxy()->MainThreadTaskRunner()->PostTask( | 386 proxy()->MainThreadTaskRunner()->PostTask( |
387 FROM_HERE, | 387 FROM_HERE, |
388 base::Bind(&LayerTreeTest::DispatchSetVisible, | 388 base::Bind(&LayerTreeTest::DispatchSetVisible, |
389 main_thread_weak_ptr_, | 389 main_thread_weak_ptr_, |
390 visible)); | 390 visible)); |
391 } | 391 } |
392 | 392 |
393 void LayerTreeTest::DoBeginTest() { | 393 void LayerTreeTest::DoBeginTest() { |
394 client_ = LayerTreeHostClientForTesting::Create(this); | 394 client_ = LayerTreeHostClientForTesting::Create(this); |
395 | 395 |
396 DCHECK(!impl_thread_ || impl_thread_->message_loop_proxy()); | 396 DCHECK(!impl_thread_ || impl_thread_->message_loop_proxy().get()); |
397 layer_tree_host_ = LayerTreeHostForTesting::Create( | 397 layer_tree_host_ = LayerTreeHostForTesting::Create( |
398 this, | 398 this, |
399 client_.get(), | 399 client_.get(), |
400 settings_, | 400 settings_, |
401 impl_thread_ ? impl_thread_->message_loop_proxy() : NULL); | 401 impl_thread_ ? impl_thread_->message_loop_proxy() : NULL); |
402 ASSERT_TRUE(layer_tree_host_); | 402 ASSERT_TRUE(layer_tree_host_); |
403 | 403 |
404 started_ = true; | 404 started_ = true; |
405 beginning_ = true; | 405 beginning_ = true; |
406 SetupTree(); | 406 SetupTree(); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 621 |
622 scoped_refptr<cc::ContextProvider> LayerTreeTest:: | 622 scoped_refptr<cc::ContextProvider> LayerTreeTest:: |
623 OffscreenContextProviderForCompositorThread() { | 623 OffscreenContextProviderForCompositorThread() { |
624 if (!compositor_thread_contexts_.get() || | 624 if (!compositor_thread_contexts_.get() || |
625 compositor_thread_contexts_->DestroyedOnMainThread()) | 625 compositor_thread_contexts_->DestroyedOnMainThread()) |
626 compositor_thread_contexts_ = FakeContextProvider::Create(); | 626 compositor_thread_contexts_ = FakeContextProvider::Create(); |
627 return compositor_thread_contexts_; | 627 return compositor_thread_contexts_; |
628 } | 628 } |
629 | 629 |
630 } // namespace cc | 630 } // namespace cc |
OLD | NEW |