| 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 22 matching lines...) Expand all Loading... |
| 33 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" | 33 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" |
| 34 #include "content/browser/compositor/offscreen_browser_compositor_output_surface
.h" | 34 #include "content/browser/compositor/offscreen_browser_compositor_output_surface
.h" |
| 35 #include "content/browser/compositor/reflector_impl.h" | 35 #include "content/browser/compositor/reflector_impl.h" |
| 36 #include "content/browser/compositor/software_browser_compositor_output_surface.
h" | 36 #include "content/browser/compositor/software_browser_compositor_output_surface.
h" |
| 37 #include "content/browser/compositor/software_output_device_mus.h" | 37 #include "content/browser/compositor/software_output_device_mus.h" |
| 38 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 38 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 39 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 39 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 40 #include "content/browser/gpu/gpu_data_manager_impl.h" | 40 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 41 #include "content/browser/renderer_host/render_widget_host_impl.h" | 41 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 42 #include "content/common/gpu/client/context_provider_command_buffer.h" | 42 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 43 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | |
| 44 #include "content/common/gpu_process_launch_causes.h" | 43 #include "content/common/gpu_process_launch_causes.h" |
| 45 #include "content/common/host_shared_bitmap_manager.h" | 44 #include "content/common/host_shared_bitmap_manager.h" |
| 46 #include "content/public/common/content_switches.h" | 45 #include "content/public/common/content_switches.h" |
| 47 #include "gpu/GLES2/gl2extchromium.h" | 46 #include "gpu/GLES2/gl2extchromium.h" |
| 48 #include "gpu/command_buffer/client/gles2_interface.h" | 47 #include "gpu/command_buffer/client/gles2_interface.h" |
| 49 #include "gpu/command_buffer/client/shared_memory_limits.h" | 48 #include "gpu/command_buffer/client/shared_memory_limits.h" |
| 50 #include "gpu/command_buffer/common/mailbox.h" | 49 #include "gpu/command_buffer/common/mailbox.h" |
| 51 #include "gpu/ipc/client/gpu_channel_host.h" | 50 #include "gpu/ipc/client/gpu_channel_host.h" |
| 52 #include "third_party/khronos/GLES2/gl2.h" | 51 #include "third_party/khronos/GLES2/gl2.h" |
| 53 #include "ui/compositor/compositor.h" | 52 #include "ui/compositor/compositor.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 attributes.stencil_size = 0; | 122 attributes.stencil_size = 0; |
| 124 attributes.samples = 0; | 123 attributes.samples = 0; |
| 125 attributes.sample_buffers = 0; | 124 attributes.sample_buffers = 0; |
| 126 attributes.bind_generates_resource = false; | 125 attributes.bind_generates_resource = false; |
| 127 attributes.lose_context_when_out_of_memory = true; | 126 attributes.lose_context_when_out_of_memory = true; |
| 128 | 127 |
| 129 bool automatic_flushes = false; | 128 bool automatic_flushes = false; |
| 130 | 129 |
| 131 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 130 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
| 132 return make_scoped_refptr(new content::ContextProviderCommandBuffer( | 131 return make_scoped_refptr(new content::ContextProviderCommandBuffer( |
| 133 base::WrapUnique(new content::WebGraphicsContext3DCommandBufferImpl( | 132 std::move(gpu_channel_host), surface_handle, url, |
| 134 surface_handle, url, gpu_channel_host.get(), gfx::PreferIntegratedGpu, | 133 gfx::PreferIntegratedGpu, automatic_flushes, gpu::SharedMemoryLimits(), |
| 135 automatic_flushes)), | 134 attributes, shared_context_provider, type)); |
| 136 gpu::SharedMemoryLimits(), attributes, shared_context_provider, type)); | |
| 137 } | 135 } |
| 138 | 136 |
| 139 #if defined(OS_MACOSX) | 137 #if defined(OS_MACOSX) |
| 140 bool IsCALayersDisabledFromCommandLine() { | 138 bool IsCALayersDisabledFromCommandLine() { |
| 141 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 139 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 142 return command_line->HasSwitch(switches::kDisableMacOverlays); | 140 return command_line->HasSwitch(switches::kDisableMacOverlays); |
| 143 } | 141 } |
| 144 #endif | 142 #endif |
| 145 | 143 |
| 146 } // namespace | 144 } // namespace |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 shared_vulkan_context_provider_ = | 778 shared_vulkan_context_provider_ = |
| 781 cc::VulkanInProcessContextProvider::Create(); | 779 cc::VulkanInProcessContextProvider::Create(); |
| 782 } | 780 } |
| 783 | 781 |
| 784 shared_vulkan_context_provider_initialized_ = true; | 782 shared_vulkan_context_provider_initialized_ = true; |
| 785 } | 783 } |
| 786 return shared_vulkan_context_provider_; | 784 return shared_vulkan_context_provider_; |
| 787 } | 785 } |
| 788 | 786 |
| 789 } // namespace content | 787 } // namespace content |
| OLD | NEW |