| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/compositor/gpu_process_transport_factory.h" | 5 #include "content/browser/compositor/gpu_process_transport_factory.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 gpu::SurfaceHandle surface_handle = gpu::kNullSurfaceHandle; | 166 gpu::SurfaceHandle surface_handle = gpu::kNullSurfaceHandle; |
| 167 BrowserCompositorOutputSurface* display_output_surface = nullptr; | 167 BrowserCompositorOutputSurface* display_output_surface = nullptr; |
| 168 cc::SyntheticBeginFrameSource* begin_frame_source = nullptr; | 168 cc::SyntheticBeginFrameSource* begin_frame_source = nullptr; |
| 169 ReflectorImpl* reflector = nullptr; | 169 ReflectorImpl* reflector = nullptr; |
| 170 std::unique_ptr<cc::Display> display; | 170 std::unique_ptr<cc::Display> display; |
| 171 bool output_is_secure = false; | 171 bool output_is_secure = false; |
| 172 gfx::ColorSpace color_space; | 172 gfx::ColorSpace color_space; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 GpuProcessTransportFactory::GpuProcessTransportFactory() | 175 GpuProcessTransportFactory::GpuProcessTransportFactory() |
| 176 : next_surface_client_id_(1u), | 176 : task_graph_runner_(new cc::SingleThreadTaskGraphRunner), |
| 177 task_graph_runner_(new cc::SingleThreadTaskGraphRunner), | |
| 178 callback_factory_(this) { | 177 callback_factory_(this) { |
| 179 cc::SetClientNameForMetrics("Browser"); | 178 cc::SetClientNameForMetrics("Browser"); |
| 180 | 179 |
| 181 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); | 180 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); |
| 182 | 181 |
| 183 task_graph_runner_->Start("CompositorTileWorker1", | 182 task_graph_runner_->Start("CompositorTileWorker1", |
| 184 base::SimpleThread::Options()); | 183 base::SimpleThread::Options()); |
| 185 #if defined(OS_WIN) | 184 #if defined(OS_WIN) |
| 186 software_backing_.reset(new OutputDeviceBacking); | 185 software_backing_.reset(new OutputDeviceBacking); |
| 187 #endif | 186 #endif |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 shared_vulkan_context_provider_ = | 873 shared_vulkan_context_provider_ = |
| 875 cc::VulkanInProcessContextProvider::Create(); | 874 cc::VulkanInProcessContextProvider::Create(); |
| 876 } | 875 } |
| 877 | 876 |
| 878 shared_vulkan_context_provider_initialized_ = true; | 877 shared_vulkan_context_provider_initialized_ = true; |
| 879 } | 878 } |
| 880 return shared_vulkan_context_provider_; | 879 return shared_vulkan_context_provider_; |
| 881 } | 880 } |
| 882 | 881 |
| 883 } // namespace content | 882 } // namespace content |
| OLD | NEW |