| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 attributes.sample_buffers = 0; | 124 attributes.sample_buffers = 0; |
| 125 attributes.bind_generates_resource = false; | 125 attributes.bind_generates_resource = false; |
| 126 attributes.lose_context_when_out_of_memory = true; | 126 attributes.lose_context_when_out_of_memory = true; |
| 127 | 127 |
| 128 bool automatic_flushes = false; | 128 bool automatic_flushes = false; |
| 129 | 129 |
| 130 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 130 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
| 131 return make_scoped_refptr(new content::ContextProviderCommandBuffer( | 131 return make_scoped_refptr(new content::ContextProviderCommandBuffer( |
| 132 base::WrapUnique(new content::WebGraphicsContext3DCommandBufferImpl( | 132 base::WrapUnique(new content::WebGraphicsContext3DCommandBufferImpl( |
| 133 surface_handle, url, gpu_channel_host.get(), gfx::PreferIntegratedGpu, | 133 surface_handle, url, gpu_channel_host.get(), gfx::PreferIntegratedGpu, |
| 134 automatic_flushes)), | 134 automatic_flushes, gpu::GPU_STREAM_DEFAULT, |
| 135 gpu::GpuStreamPriority::NORMAL)), |
| 135 gpu::SharedMemoryLimits(), attributes, shared_context_provider, type)); | 136 gpu::SharedMemoryLimits(), attributes, shared_context_provider, type)); |
| 136 } | 137 } |
| 137 | 138 |
| 138 #if defined(OS_MACOSX) | 139 #if defined(OS_MACOSX) |
| 139 bool IsCALayersDisabledFromCommandLine() { | 140 bool IsCALayersDisabledFromCommandLine() { |
| 140 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 141 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 141 return command_line->HasSwitch(switches::kDisableMacOverlays); | 142 return command_line->HasSwitch(switches::kDisableMacOverlays); |
| 142 } | 143 } |
| 143 #endif | 144 #endif |
| 144 | 145 |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 shared_vulkan_context_provider_ = | 760 shared_vulkan_context_provider_ = |
| 760 cc::VulkanInProcessContextProvider::Create(); | 761 cc::VulkanInProcessContextProvider::Create(); |
| 761 } | 762 } |
| 762 | 763 |
| 763 shared_vulkan_context_provider_initialized_ = true; | 764 shared_vulkan_context_provider_initialized_ = true; |
| 764 } | 765 } |
| 765 return shared_vulkan_context_provider_; | 766 return shared_vulkan_context_provider_; |
| 766 } | 767 } |
| 767 | 768 |
| 768 } // namespace content | 769 } // namespace content |
| OLD | NEW |