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

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

Issue 2365583004: Mac: Clean up plumbing of accelerated widgets (Closed)
Patch Set: make_scoped_refptr Created 4 years, 3 months 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 if (data->surface_handle == gpu::kNullSurfaceHandle) { 475 if (data->surface_handle == gpu::kNullSurfaceHandle) {
476 display_output_surface = 476 display_output_surface =
477 base::MakeUnique<OffscreenBrowserCompositorOutputSurface>( 477 base::MakeUnique<OffscreenBrowserCompositorOutputSurface>(
478 context_provider, compositor->vsync_manager(), 478 context_provider, compositor->vsync_manager(),
479 begin_frame_source.get(), 479 begin_frame_source.get(),
480 std::unique_ptr< 480 std::unique_ptr<
481 display_compositor::CompositorOverlayCandidateValidator>()); 481 display_compositor::CompositorOverlayCandidateValidator>());
482 } else if (capabilities.surfaceless) { 482 } else if (capabilities.surfaceless) {
483 #if defined(OS_MACOSX) 483 #if defined(OS_MACOSX)
484 display_output_surface = base::MakeUnique<GpuOutputSurfaceMac>( 484 display_output_surface = base::MakeUnique<GpuOutputSurfaceMac>(
485 context_provider, data->surface_handle, compositor->vsync_manager(), 485 compositor->widget(), context_provider, data->surface_handle,
486 begin_frame_source.get(), 486 compositor->vsync_manager(), begin_frame_source.get(),
487 CreateOverlayCandidateValidator(compositor->widget()), 487 CreateOverlayCandidateValidator(compositor->widget()),
488 GetGpuMemoryBufferManager()); 488 GetGpuMemoryBufferManager());
489 #else 489 #else
490 display_output_surface = 490 display_output_surface =
491 base::MakeUnique<GpuSurfacelessBrowserCompositorOutputSurface>( 491 base::MakeUnique<GpuSurfacelessBrowserCompositorOutputSurface>(
492 context_provider, data->surface_handle, 492 context_provider, data->surface_handle,
493 compositor->vsync_manager(), begin_frame_source.get(), 493 compositor->vsync_manager(), begin_frame_source.get(),
494 CreateOverlayCandidateValidator(compositor->widget()), 494 CreateOverlayCandidateValidator(compositor->widget()),
495 GL_TEXTURE_2D, GL_RGB, ui::DisplaySnapshot::PrimaryFormat(), 495 GL_TEXTURE_2D, GL_RGB, ui::DisplaySnapshot::PrimaryFormat(),
496 GetGpuMemoryBufferManager()); 496 GetGpuMemoryBufferManager());
(...skipping 374 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
« no previous file with comments | « content/browser/compositor/gpu_output_surface_mac.mm ('k') | gpu/ipc/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698