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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 attributes.samples = 0; | 130 attributes.samples = 0; |
131 attributes.sample_buffers = 0; | 131 attributes.sample_buffers = 0; |
132 attributes.bind_generates_resource = false; | 132 attributes.bind_generates_resource = false; |
133 attributes.lose_context_when_out_of_memory = true; | 133 attributes.lose_context_when_out_of_memory = true; |
134 | 134 |
135 constexpr bool automatic_flushes = false; | 135 constexpr bool automatic_flushes = false; |
136 | 136 |
137 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 137 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
138 return make_scoped_refptr(new content::ContextProviderCommandBuffer( | 138 return make_scoped_refptr(new content::ContextProviderCommandBuffer( |
139 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, | 139 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
140 gpu::GpuStreamPriority::NORMAL, surface_handle, url, | 140 gpu::GpuStreamPriority::NORMAL, surface_handle, url, automatic_flushes, |
141 gl::PreferIntegratedGpu, automatic_flushes, support_locking, | 141 support_locking, gpu::SharedMemoryLimits(), attributes, |
142 gpu::SharedMemoryLimits(), attributes, shared_context_provider, type)); | 142 shared_context_provider, type)); |
143 } | 143 } |
144 | 144 |
145 #if defined(OS_MACOSX) | 145 #if defined(OS_MACOSX) |
146 bool IsCALayersDisabledFromCommandLine() { | 146 bool IsCALayersDisabledFromCommandLine() { |
147 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 147 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
148 return command_line->HasSwitch(switches::kDisableMacOverlays); | 148 return command_line->HasSwitch(switches::kDisableMacOverlays); |
149 } | 149 } |
150 #endif | 150 #endif |
151 | 151 |
152 } // namespace | 152 } // namespace |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 shared_vulkan_context_provider_ = | 804 shared_vulkan_context_provider_ = |
805 cc::VulkanInProcessContextProvider::Create(); | 805 cc::VulkanInProcessContextProvider::Create(); |
806 } | 806 } |
807 | 807 |
808 shared_vulkan_context_provider_initialized_ = true; | 808 shared_vulkan_context_provider_initialized_ = true; |
809 } | 809 } |
810 return shared_vulkan_context_provider_; | 810 return shared_vulkan_context_provider_; |
811 } | 811 } |
812 | 812 |
813 } // namespace content | 813 } // namespace content |
OLD | NEW |