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/delegated_renderer_layer_impl.h" | 5 #include "cc/layers/delegated_renderer_layer_impl.h" |
6 | 6 |
7 #include "cc/base/scoped_ptr_vector.h" | 7 #include "cc/base/scoped_ptr_vector.h" |
8 #include "cc/layers/solid_color_layer_impl.h" | 8 #include "cc/layers/solid_color_layer_impl.h" |
9 #include "cc/quads/render_pass_draw_quad.h" | 9 #include "cc/quads/render_pass_draw_quad.h" |
10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 DelegatedRendererLayerImplTest() | 33 DelegatedRendererLayerImplTest() |
34 : proxy_(), | 34 : proxy_(), |
35 always_impl_thread_and_main_thread_blocked_(&proxy_), | 35 always_impl_thread_and_main_thread_blocked_(&proxy_), |
36 output_surface_(FakeOutputSurface::Create3d()) { | 36 output_surface_(FakeOutputSurface::Create3d()) { |
37 LayerTreeSettings settings; | 37 LayerTreeSettings settings; |
38 settings.minimum_occlusion_tracking_size = gfx::Size(); | 38 settings.minimum_occlusion_tracking_size = gfx::Size(); |
39 | 39 |
40 host_impl_.reset(new FakeLayerTreeHostImpl( | 40 host_impl_.reset(new FakeLayerTreeHostImpl( |
41 settings, &proxy_, &shared_bitmap_manager_, &task_graph_runner_)); | 41 settings, &proxy_, &shared_bitmap_manager_, &task_graph_runner_)); |
| 42 host_impl_->SetVisible(true); |
42 host_impl_->InitializeRenderer(output_surface_.get()); | 43 host_impl_->InitializeRenderer(output_surface_.get()); |
43 host_impl_->SetViewportSize(gfx::Size(10, 10)); | 44 host_impl_->SetViewportSize(gfx::Size(10, 10)); |
44 } | 45 } |
45 | 46 |
46 protected: | 47 protected: |
47 FakeImplProxy proxy_; | 48 FakeImplProxy proxy_; |
48 DebugScopedSetImplThreadAndMainThreadBlocked | 49 DebugScopedSetImplThreadAndMainThreadBlocked |
49 always_impl_thread_and_main_thread_blocked_; | 50 always_impl_thread_and_main_thread_blocked_; |
50 TestSharedBitmapManager shared_bitmap_manager_; | 51 TestSharedBitmapManager shared_bitmap_manager_; |
51 TestTaskGraphRunner task_graph_runner_; | 52 TestTaskGraphRunner task_graph_runner_; |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1668 scoped_ptr<DelegatedRendererLayerImpl> other_layer = | 1669 scoped_ptr<DelegatedRendererLayerImpl> other_layer = |
1669 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6); | 1670 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6); |
1670 | 1671 |
1671 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get()); | 1672 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get()); |
1672 | 1673 |
1673 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor()); | 1674 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor()); |
1674 } | 1675 } |
1675 | 1676 |
1676 } // namespace | 1677 } // namespace |
1677 } // namespace cc | 1678 } // namespace cc |
OLD | NEW |