Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2472433002: Fixed compile- and link-time errors with the "enable_vulkan" GN-argument (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 base::MakeUnique<cc::DelayBasedTimeSource>( 445 base::MakeUnique<cc::DelayBasedTimeSource>(
446 compositor->task_runner().get()))); 446 compositor->task_runner().get())));
447 } 447 }
448 448
449 std::unique_ptr<BrowserCompositorOutputSurface> display_output_surface; 449 std::unique_ptr<BrowserCompositorOutputSurface> display_output_surface;
450 #if defined(ENABLE_VULKAN) 450 #if defined(ENABLE_VULKAN)
451 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface; 451 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface;
452 if (vulkan_context_provider) { 452 if (vulkan_context_provider) {
453 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface( 453 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface(
454 vulkan_context_provider, compositor->vsync_manager(), 454 vulkan_context_provider, compositor->vsync_manager(),
455 compositor->task_runner().get())); 455 begin_frame_source.get()));
456 if (!vulkan_surface->Initialize(compositor.get()->widget())) { 456 if (!vulkan_surface->Initialize(compositor.get()->widget())) {
457 vulkan_surface->Destroy(); 457 vulkan_surface->Destroy();
458 vulkan_surface.reset(); 458 vulkan_surface.reset();
459 } else { 459 } else {
460 display_output_surface = std::move(vulkan_surface); 460 display_output_surface = std::move(vulkan_surface);
461 } 461 }
462 } 462 }
463 #endif 463 #endif
464 464
465 if (!display_output_surface) { 465 if (!display_output_surface) {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 shared_vulkan_context_provider_ = 871 shared_vulkan_context_provider_ =
872 cc::VulkanInProcessContextProvider::Create(); 872 cc::VulkanInProcessContextProvider::Create();
873 } 873 }
874 874
875 shared_vulkan_context_provider_initialized_ = true; 875 shared_vulkan_context_provider_initialized_ = true;
876 } 876 }
877 return shared_vulkan_context_provider_; 877 return shared_vulkan_context_provider_;
878 } 878 }
879 879
880 } // namespace content 880 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698