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 "cc/test/pixel_test.h" | 5 #include "cc/test/pixel_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 std::move(compositor), std::move(worker), flipped_output_surface)); | 135 std::move(compositor), std::move(worker), flipped_output_surface)); |
136 output_surface_->BindToClient(output_surface_client_.get()); | 136 output_surface_->BindToClient(output_surface_client_.get()); |
137 | 137 |
138 shared_bitmap_manager_.reset(new TestSharedBitmapManager); | 138 shared_bitmap_manager_.reset(new TestSharedBitmapManager); |
139 gpu_memory_buffer_manager_.reset(new TestGpuMemoryBufferManager); | 139 gpu_memory_buffer_manager_.reset(new TestGpuMemoryBufferManager); |
140 resource_provider_ = base::MakeUnique<ResourceProvider>( | 140 resource_provider_ = base::MakeUnique<ResourceProvider>( |
141 output_surface_->context_provider(), shared_bitmap_manager_.get(), | 141 output_surface_->context_provider(), shared_bitmap_manager_.get(), |
142 gpu_memory_buffer_manager_.get(), main_thread_task_runner_.get(), 0, 1, | 142 gpu_memory_buffer_manager_.get(), main_thread_task_runner_.get(), 0, 1, |
143 output_surface_->capabilities().delegated_sync_points_required, | 143 output_surface_->capabilities().delegated_sync_points_required, |
144 settings_.renderer_settings.use_gpu_memory_buffer_resources, | 144 settings_.renderer_settings.use_gpu_memory_buffer_resources, |
145 settings_.use_image_texture_targets); | 145 settings_.renderer_settings.buffer_to_texture_target_map); |
146 | 146 |
147 texture_mailbox_deleter_ = base::WrapUnique( | 147 texture_mailbox_deleter_ = base::WrapUnique( |
148 new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get())); | 148 new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get())); |
149 | 149 |
150 renderer_ = GLRenderer::Create( | 150 renderer_ = GLRenderer::Create( |
151 this, &settings_.renderer_settings, output_surface_.get(), | 151 this, &settings_.renderer_settings, output_surface_.get(), |
152 resource_provider_.get(), texture_mailbox_deleter_.get(), 0); | 152 resource_provider_.get(), texture_mailbox_deleter_.get(), 0); |
153 } | 153 } |
154 | 154 |
155 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { | 155 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { |
(...skipping 23 matching lines...) Expand all Loading... |
179 std::unique_ptr<SoftwareOutputDevice> device( | 179 std::unique_ptr<SoftwareOutputDevice> device( |
180 new PixelTestSoftwareOutputDevice()); | 180 new PixelTestSoftwareOutputDevice()); |
181 output_surface_.reset(new PixelTestOutputSurface(std::move(device))); | 181 output_surface_.reset(new PixelTestOutputSurface(std::move(device))); |
182 output_surface_->BindToClient(output_surface_client_.get()); | 182 output_surface_->BindToClient(output_surface_client_.get()); |
183 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 183 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
184 bool delegated_sync_points_required = false; // Meaningless for software. | 184 bool delegated_sync_points_required = false; // Meaningless for software. |
185 resource_provider_ = base::MakeUnique<ResourceProvider>( | 185 resource_provider_ = base::MakeUnique<ResourceProvider>( |
186 nullptr, shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(), | 186 nullptr, shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(), |
187 main_thread_task_runner_.get(), 0, 1, delegated_sync_points_required, | 187 main_thread_task_runner_.get(), 0, 1, delegated_sync_points_required, |
188 settings_.renderer_settings.use_gpu_memory_buffer_resources, | 188 settings_.renderer_settings.use_gpu_memory_buffer_resources, |
189 settings_.use_image_texture_targets); | 189 settings_.renderer_settings.buffer_to_texture_target_map); |
190 std::unique_ptr<SoftwareRenderer> renderer = | 190 std::unique_ptr<SoftwareRenderer> renderer = |
191 SoftwareRenderer::Create(this, &settings_.renderer_settings, | 191 SoftwareRenderer::Create(this, &settings_.renderer_settings, |
192 output_surface_.get(), resource_provider_.get()); | 192 output_surface_.get(), resource_provider_.get()); |
193 software_renderer_ = renderer.get(); | 193 software_renderer_ = renderer.get(); |
194 renderer_ = std::move(renderer); | 194 renderer_ = std::move(renderer); |
195 } | 195 } |
196 | 196 |
197 } // namespace cc | 197 } // namespace cc |
OLD | NEW |