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/gpu/browser_gpu_memory_buffer_manager.h" | 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 for (auto& format : kNativeFormats) { | 134 for (auto& format : kNativeFormats) { |
135 for (auto& usage : kNativeUsages) { | 135 for (auto& usage : kNativeUsages) { |
136 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage)) | 136 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage)) |
137 configurations.insert(std::make_pair(format, usage)); | 137 configurations.insert(std::make_pair(format, usage)); |
138 } | 138 } |
139 } | 139 } |
140 } | 140 } |
141 | 141 |
142 if (force_native_scanout_formats) { | 142 if (force_native_scanout_formats) { |
143 const gfx::BufferFormat kScanoutFormats[] = { | 143 const gfx::BufferFormat kScanoutFormats[] = { |
144 gfx::BufferFormat::BGRA_8888, gfx::BufferFormat::BGRX_8888, | 144 gfx::BufferFormat::RGBA_8888, gfx::BufferFormat::BGRA_8888, |
145 gfx::BufferFormat::UYVY_422, gfx::BufferFormat::YUV_420_BIPLANAR}; | 145 gfx::BufferFormat::BGRX_8888, gfx::BufferFormat::UYVY_422, |
| 146 gfx::BufferFormat::YUV_420_BIPLANAR}; |
146 for (auto& format : kScanoutFormats) { | 147 for (auto& format : kScanoutFormats) { |
147 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported( | 148 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported( |
148 format, gfx::BufferUsage::SCANOUT)) { | 149 format, gfx::BufferUsage::SCANOUT)) { |
149 configurations.insert( | 150 configurations.insert( |
150 std::make_pair(format, gfx::BufferUsage::SCANOUT)); | 151 std::make_pair(format, gfx::BufferUsage::SCANOUT)); |
151 } | 152 } |
152 } | 153 } |
153 } | 154 } |
154 | 155 |
155 return configurations; | 156 return configurations; |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 return gpu_client_tracing_id_; | 706 return gpu_client_tracing_id_; |
706 } | 707 } |
707 | 708 |
708 // In normal cases, |client_id| is a child process id, so we can perform | 709 // In normal cases, |client_id| is a child process id, so we can perform |
709 // the standard conversion. | 710 // the standard conversion. |
710 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( | 711 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( |
711 client_id); | 712 client_id); |
712 } | 713 } |
713 | 714 |
714 } // namespace content | 715 } // namespace content |
OLD | NEW |