OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 class TextureLayerImplWithMailboxTest : public TextureLayerTest { | 828 class TextureLayerImplWithMailboxTest : public TextureLayerTest { |
829 protected: | 829 protected: |
830 TextureLayerImplWithMailboxTest() | 830 TextureLayerImplWithMailboxTest() |
831 : fake_client_( | 831 : fake_client_( |
832 FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D)) {} | 832 FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D)) {} |
833 | 833 |
834 void SetUp() override { | 834 void SetUp() override { |
835 TextureLayerTest::SetUp(); | 835 TextureLayerTest::SetUp(); |
836 layer_tree_host_ = | 836 layer_tree_host_ = |
837 MockLayerTreeHost::Create(&fake_client_, &task_graph_runner_); | 837 MockLayerTreeHost::Create(&fake_client_, &task_graph_runner_); |
| 838 host_impl_.SetVisible(true); |
838 EXPECT_TRUE(host_impl_.InitializeRenderer(output_surface_.get())); | 839 EXPECT_TRUE(host_impl_.InitializeRenderer(output_surface_.get())); |
839 } | 840 } |
840 | 841 |
841 bool WillDraw(TextureLayerImpl* layer, DrawMode mode) { | 842 bool WillDraw(TextureLayerImpl* layer, DrawMode mode) { |
842 bool will_draw = layer->WillDraw( | 843 bool will_draw = layer->WillDraw( |
843 mode, host_impl_.active_tree()->resource_provider()); | 844 mode, host_impl_.active_tree()->resource_provider()); |
844 if (will_draw) | 845 if (will_draw) |
845 layer->DidDraw(host_impl_.active_tree()->resource_provider()); | 846 layer->DidDraw(host_impl_.active_tree()->resource_provider()); |
846 return will_draw; | 847 return will_draw; |
847 } | 848 } |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 int callback_count_; | 1459 int callback_count_; |
1459 scoped_refptr<Layer> root_; | 1460 scoped_refptr<Layer> root_; |
1460 scoped_refptr<TextureLayer> layer_; | 1461 scoped_refptr<TextureLayer> layer_; |
1461 }; | 1462 }; |
1462 | 1463 |
1463 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1464 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
1464 TextureLayerWithMailboxImplThreadDeleted); | 1465 TextureLayerWithMailboxImplThreadDeleted); |
1465 | 1466 |
1466 } // namespace | 1467 } // namespace |
1467 } // namespace cc | 1468 } // namespace cc |
OLD | NEW |