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

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

Issue 2213273002: ozone: Consolidate primary plane format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment on a single line. Created 4 years, 4 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "gpu/GLES2/gl2extchromium.h" 49 #include "gpu/GLES2/gl2extchromium.h"
50 #include "gpu/command_buffer/client/gles2_interface.h" 50 #include "gpu/command_buffer/client/gles2_interface.h"
51 #include "gpu/command_buffer/client/shared_memory_limits.h" 51 #include "gpu/command_buffer/client/shared_memory_limits.h"
52 #include "gpu/command_buffer/common/mailbox.h" 52 #include "gpu/command_buffer/common/mailbox.h"
53 #include "gpu/ipc/client/gpu_channel_host.h" 53 #include "gpu/ipc/client/gpu_channel_host.h"
54 #include "third_party/khronos/GLES2/gl2.h" 54 #include "third_party/khronos/GLES2/gl2.h"
55 #include "ui/compositor/compositor.h" 55 #include "ui/compositor/compositor.h"
56 #include "ui/compositor/compositor_constants.h" 56 #include "ui/compositor/compositor_constants.h"
57 #include "ui/compositor/compositor_switches.h" 57 #include "ui/compositor/compositor_switches.h"
58 #include "ui/compositor/layer.h" 58 #include "ui/compositor/layer.h"
59 #include "ui/display/types/display_snapshot.h"
59 #include "ui/gfx/geometry/size.h" 60 #include "ui/gfx/geometry/size.h"
60 61
61 #if defined(MOJO_RUNNER_CLIENT) 62 #if defined(MOJO_RUNNER_CLIENT)
62 #include "content/browser/compositor/mus_browser_compositor_output_surface.h" 63 #include "content/browser/compositor/mus_browser_compositor_output_surface.h"
63 #include "content/public/common/mojo_shell_connection.h" 64 #include "content/public/common/mojo_shell_connection.h"
64 #include "services/shell/runner/common/client_util.h" 65 #include "services/shell/runner/common/client_util.h"
65 #include "services/ui/common/gpu_service.h" 66 #include "services/ui/common/gpu_service.h"
66 #endif 67 #endif
67 68
68 #if defined(OS_WIN) 69 #if defined(OS_WIN)
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 context_provider, data->surface_handle, compositor->vsync_manager(), 518 context_provider, data->surface_handle, compositor->vsync_manager(),
518 begin_frame_source.get(), 519 begin_frame_source.get(),
519 CreateOverlayCandidateValidator(compositor->widget()), 520 CreateOverlayCandidateValidator(compositor->widget()),
520 BrowserGpuMemoryBufferManager::current())); 521 BrowserGpuMemoryBufferManager::current()));
521 #else 522 #else
522 display_output_surface = 523 display_output_surface =
523 base::WrapUnique(new GpuSurfacelessBrowserCompositorOutputSurface( 524 base::WrapUnique(new GpuSurfacelessBrowserCompositorOutputSurface(
524 context_provider, data->surface_handle, 525 context_provider, data->surface_handle,
525 compositor->vsync_manager(), begin_frame_source.get(), 526 compositor->vsync_manager(), begin_frame_source.get(),
526 CreateOverlayCandidateValidator(compositor->widget()), 527 CreateOverlayCandidateValidator(compositor->widget()),
527 GL_TEXTURE_2D, GL_RGB, 528 GL_TEXTURE_2D, GL_RGB, ui::DisplaySnapshot::PrimaryFormat(),
528 BrowserGpuMemoryBufferManager::current())); 529 BrowserGpuMemoryBufferManager::current()));
529 #endif 530 #endif
530 } else { 531 } else {
531 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 532 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
532 validator; 533 validator;
533 #if !defined(OS_MACOSX) 534 #if !defined(OS_MACOSX)
534 // Overlays are only supported on surfaceless output surfaces on Mac. 535 // Overlays are only supported on surfaceless output surfaces on Mac.
535 if (!use_mus) 536 if (!use_mus)
536 validator = CreateOverlayCandidateValidator(compositor->widget()); 537 validator = CreateOverlayCandidateValidator(compositor->widget());
537 #endif 538 #endif
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 shared_vulkan_context_provider_ = 894 shared_vulkan_context_provider_ =
894 cc::VulkanInProcessContextProvider::Create(); 895 cc::VulkanInProcessContextProvider::Create();
895 } 896 }
896 897
897 shared_vulkan_context_provider_initialized_ = true; 898 shared_vulkan_context_provider_initialized_ = true;
898 } 899 }
899 return shared_vulkan_context_provider_; 900 return shared_vulkan_context_provider_;
900 } 901 }
901 902
902 } // namespace content 903 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698