| 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/append_quads_data.h" | 8 #include "cc/layers/append_quads_data.h" |
| 9 #include "cc/layers/quad_sink.h" | 9 #include "cc/layers/quad_sink.h" |
| 10 #include "cc/layers/solid_color_layer_impl.h" | 10 #include "cc/layers/solid_color_layer_impl.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 class DelegatedRendererLayerImplTest : public testing::Test { | 32 class DelegatedRendererLayerImplTest : public testing::Test { |
| 33 public: | 33 public: |
| 34 DelegatedRendererLayerImplTest() | 34 DelegatedRendererLayerImplTest() |
| 35 : proxy_(scoped_ptr<Thread>(NULL)) | 35 : proxy_(scoped_ptr<Thread>(NULL)) |
| 36 , always_impl_thread_and_main_thread_blocked_(&proxy_) { | 36 , always_impl_thread_and_main_thread_blocked_(&proxy_) { |
| 37 LayerTreeSettings settings; | 37 LayerTreeSettings settings; |
| 38 settings.minimumOcclusionTrackingSize = gfx::Size(); | 38 settings.minimumOcclusionTrackingSize = gfx::Size(); |
| 39 | 39 |
| 40 host_impl_ = LayerTreeHostImpl::Create(settings, &client_, &proxy_); | 40 scoped_ptr<RenderingStatsInstrumentation> stats_instrumentation = |
| 41 RenderingStatsInstrumentation::Create(); |
| 42 |
| 43 host_impl_ = LayerTreeHostImpl::Create(settings, |
| 44 &client_, |
| 45 &proxy_, |
| 46 stats_instrumentation.get()); |
| 41 host_impl_->InitializeRenderer(createFakeOutputSurface()); | 47 host_impl_->InitializeRenderer(createFakeOutputSurface()); |
| 42 host_impl_->SetViewportSize(gfx::Size(10, 10), gfx::Size(10, 10)); | 48 host_impl_->SetViewportSize(gfx::Size(10, 10), gfx::Size(10, 10)); |
| 43 } | 49 } |
| 44 | 50 |
| 45 protected: | 51 protected: |
| 46 FakeProxy proxy_; | 52 FakeProxy proxy_; |
| 47 FakeLayerTreeHostImplClient client_; | 53 FakeLayerTreeHostImplClient client_; |
| 48 DebugScopedSetImplThreadAndMainThreadBlocked | 54 DebugScopedSetImplThreadAndMainThreadBlocked |
| 49 always_impl_thread_and_main_thread_blocked_; | 55 always_impl_thread_and_main_thread_blocked_; |
| 50 scoped_ptr<LayerTreeHostImpl> host_impl_; | 56 scoped_ptr<LayerTreeHostImpl> host_impl_; |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 root_delegated_shared_quad_state->clip_rect.ToString()); | 1252 root_delegated_shared_quad_state->clip_rect.ToString()); |
| 1247 // Quads came with a clip rect. | 1253 // Quads came with a clip rect. |
| 1248 EXPECT_TRUE(root_delegated_shared_quad_state->is_clipped); | 1254 EXPECT_TRUE(root_delegated_shared_quad_state->is_clipped); |
| 1249 | 1255 |
| 1250 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); | 1256 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); |
| 1251 host_impl_->DidDrawAllLayers(frame); | 1257 host_impl_->DidDrawAllLayers(frame); |
| 1252 } | 1258 } |
| 1253 | 1259 |
| 1254 } // namespace | 1260 } // namespace |
| 1255 } // namespace cc | 1261 } // namespace cc |
| OLD | NEW |