| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); | 177 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); |
| 178 | 178 |
| 179 task_graph_runner_->Start("CompositorTileWorker1", | 179 task_graph_runner_->Start("CompositorTileWorker1", |
| 180 base::SimpleThread::Options()); | 180 base::SimpleThread::Options()); |
| 181 #if defined(OS_WIN) | 181 #if defined(OS_WIN) |
| 182 software_backing_.reset(new OutputDeviceBacking); | 182 software_backing_.reset(new OutputDeviceBacking); |
| 183 #endif | 183 #endif |
| 184 } | 184 } |
| 185 | 185 |
| 186 GpuProcessTransportFactory::~GpuProcessTransportFactory() { | 186 GpuProcessTransportFactory::~GpuProcessTransportFactory() { |
| 187 // If this fails, then we are leaking compositors. | 187 DCHECK(per_compositor_data_.empty()); |
| 188 CHECK(per_compositor_data_.empty()); | |
| 189 | 188 |
| 190 // Make sure the lost context callback doesn't try to run during destruction. | 189 // Make sure the lost context callback doesn't try to run during destruction. |
| 191 callback_factory_.InvalidateWeakPtrs(); | 190 callback_factory_.InvalidateWeakPtrs(); |
| 192 | 191 |
| 193 task_graph_runner_->Shutdown(); | 192 task_graph_runner_->Shutdown(); |
| 194 } | 193 } |
| 195 | 194 |
| 196 std::unique_ptr<cc::SoftwareOutputDevice> | 195 std::unique_ptr<cc::SoftwareOutputDevice> |
| 197 GpuProcessTransportFactory::CreateSoftwareOutputDevice( | 196 GpuProcessTransportFactory::CreateSoftwareOutputDevice( |
| 198 ui::Compositor* compositor) { | 197 ui::Compositor* compositor) { |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 shared_vulkan_context_provider_ = | 870 shared_vulkan_context_provider_ = |
| 872 cc::VulkanInProcessContextProvider::Create(); | 871 cc::VulkanInProcessContextProvider::Create(); |
| 873 } | 872 } |
| 874 | 873 |
| 875 shared_vulkan_context_provider_initialized_ = true; | 874 shared_vulkan_context_provider_initialized_ = true; |
| 876 } | 875 } |
| 877 return shared_vulkan_context_provider_; | 876 return shared_vulkan_context_provider_; |
| 878 } | 877 } |
| 879 | 878 |
| 880 } // namespace content | 879 } // namespace content |
| OLD | NEW |