OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 callbacks_[id] = result->size(); | 124 callbacks_[id] = result->size(); |
125 } | 125 } |
126 | 126 |
127 void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); } | 127 void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); } |
128 | 128 |
129 std::unique_ptr<OutputSurface> CreateOutputSurface() override { | 129 std::unique_ptr<OutputSurface> CreateOutputSurface() override { |
130 if (!use_gl_renderer_) { | 130 if (!use_gl_renderer_) { |
131 return FakeOutputSurface::CreateSoftware( | 131 return FakeOutputSurface::CreateSoftware( |
132 base::WrapUnique(new SoftwareOutputDevice)); | 132 base::WrapUnique(new SoftwareOutputDevice)); |
133 } | 133 } |
| 134 |
134 std::unique_ptr<FakeOutputSurface> output_surface = | 135 std::unique_ptr<FakeOutputSurface> output_surface = |
135 FakeOutputSurface::Create3d(); | 136 FakeOutputSurface::Create3d(TestContextProvider::Create(), |
| 137 TestContextProvider::CreateWorker()); |
136 TestContextSupport* context_support = static_cast<TestContextSupport*>( | 138 TestContextSupport* context_support = static_cast<TestContextSupport*>( |
137 output_surface->context_provider()->ContextSupport()); | 139 output_surface->context_provider()->ContextSupport()); |
138 context_support->set_out_of_order_callbacks(out_of_order_callbacks_); | 140 context_support->set_out_of_order_callbacks(out_of_order_callbacks_); |
139 return std::move(output_surface); | 141 return std::move(output_surface); |
140 } | 142 } |
141 | 143 |
142 bool use_gl_renderer_; | 144 bool use_gl_renderer_; |
143 bool out_of_order_callbacks_ = false; | 145 bool out_of_order_callbacks_ = false; |
144 std::map<size_t, gfx::Size> callbacks_; | 146 std::map<size_t, gfx::Size> callbacks_; |
145 FakeContentLayerClient client_; | 147 FakeContentLayerClient client_; |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 int num_draws_; | 1270 int num_draws_; |
1269 bool copy_happened_; | 1271 bool copy_happened_; |
1270 bool draw_happened_; | 1272 bool draw_happened_; |
1271 }; | 1273 }; |
1272 | 1274 |
1273 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1275 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
1274 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); | 1276 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); |
1275 | 1277 |
1276 } // namespace | 1278 } // namespace |
1277 } // namespace cc | 1279 } // namespace cc |
OLD | NEW |