| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 scoped_refptr<ContextProvider> context_provider, | 152 scoped_refptr<ContextProvider> context_provider, |
| 153 scoped_refptr<ContextProvider> worker_context_provider) | 153 scoped_refptr<ContextProvider> worker_context_provider) |
| 154 : OutputSurface(std::move(context_provider), | 154 : OutputSurface(std::move(context_provider), |
| 155 std::move(worker_context_provider), | 155 std::move(worker_context_provider), |
| 156 #if defined(ENABLE_VULKAN) | 156 #if defined(ENABLE_VULKAN) |
| 157 nullptr, | 157 nullptr, |
| 158 #endif | 158 #endif |
| 159 nullptr) { | 159 nullptr) { |
| 160 } | 160 } |
| 161 | 161 |
| 162 #if defined(ENABLE_VULKAN) | |
| 163 OutputSurface::OutputSurface( | |
| 164 scoped_refptr<VulkanContextProvider> vulkan_context_provider) | |
| 165 : OutputSurface(nullptr, | |
| 166 nullptr, | |
| 167 std::move(vulkan_context_provider), | |
| 168 nullptr) {} | |
| 169 #endif | |
| 170 | |
| 171 OutputSurface::OutputSurface( | 162 OutputSurface::OutputSurface( |
| 172 std::unique_ptr<SoftwareOutputDevice> software_device) | 163 std::unique_ptr<SoftwareOutputDevice> software_device) |
| 173 : OutputSurface(nullptr, | 164 : OutputSurface(nullptr, |
| 174 nullptr, | 165 nullptr, |
| 175 #if defined(ENABLE_VULKAN) | 166 #if defined(ENABLE_VULKAN) |
| 176 nullptr, | 167 nullptr, |
| 177 #endif | 168 #endif |
| 178 std::move(software_device)) { | 169 std::move(software_device)) { |
| 179 } | 170 } |
| 180 | 171 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (context_provider_.get()) { | 373 if (context_provider_.get()) { |
| 383 context_provider_->SetLostContextCallback( | 374 context_provider_->SetLostContextCallback( |
| 384 ContextProvider::LostContextCallback()); | 375 ContextProvider::LostContextCallback()); |
| 385 } | 376 } |
| 386 context_provider_ = nullptr; | 377 context_provider_ = nullptr; |
| 387 client_ = nullptr; | 378 client_ = nullptr; |
| 388 weak_ptr_factory_.InvalidateWeakPtrs(); | 379 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 389 } | 380 } |
| 390 | 381 |
| 391 } // namespace cc | 382 } // namespace cc |
| OLD | NEW |