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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 1316493004: Add support for converting I420 software frames into NV12 hardware frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 years, 3 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/gpu/browser_gpu_memory_buffer_manager.h" 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 {gfx::BufferFormat::R_8, gfx::BufferUsage::MAP}, 111 {gfx::BufferFormat::R_8, gfx::BufferUsage::MAP},
112 {gfx::BufferFormat::R_8, gfx::BufferUsage::PERSISTENT_MAP}, 112 {gfx::BufferFormat::R_8, gfx::BufferUsage::PERSISTENT_MAP},
113 {gfx::BufferFormat::RGBA_4444, gfx::BufferUsage::MAP}, 113 {gfx::BufferFormat::RGBA_4444, gfx::BufferUsage::MAP},
114 {gfx::BufferFormat::RGBA_4444, gfx::BufferUsage::PERSISTENT_MAP}, 114 {gfx::BufferFormat::RGBA_4444, gfx::BufferUsage::PERSISTENT_MAP},
115 {gfx::BufferFormat::RGBA_8888, gfx::BufferUsage::MAP}, 115 {gfx::BufferFormat::RGBA_8888, gfx::BufferUsage::MAP},
116 {gfx::BufferFormat::RGBA_8888, gfx::BufferUsage::PERSISTENT_MAP}, 116 {gfx::BufferFormat::RGBA_8888, gfx::BufferUsage::PERSISTENT_MAP},
117 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::MAP}, 117 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::MAP},
118 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::PERSISTENT_MAP}, 118 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::PERSISTENT_MAP},
119 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::MAP}, 119 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::MAP},
120 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::PERSISTENT_MAP}, 120 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::PERSISTENT_MAP},
121 {gfx::BufferFormat::YUV_420_BIPLANAR, gfx::BufferUsage::MAP},
122 {gfx::BufferFormat::YUV_420_BIPLANAR, gfx::BufferUsage::PERSISTENT_MAP},
121 }; 123 };
122 for (auto& configuration : kNativeConfigurations) { 124 for (auto& configuration : kNativeConfigurations) {
123 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration)) 125 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration))
124 configurations.push_back(configuration); 126 configurations.push_back(configuration);
125 } 127 }
126 } 128 }
127 129
128 #if defined(USE_OZONE) || defined(OS_MACOSX) 130 #if defined(USE_OZONE) || defined(OS_MACOSX)
129 const GpuMemoryBufferFactory::Configuration kScanoutConfigurations[] = { 131 const GpuMemoryBufferFactory::Configuration kScanoutConfigurations[] = {
130 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::SCANOUT}, 132 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::SCANOUT},
131 {gfx::BufferFormat::BGRX_8888, gfx::BufferUsage::SCANOUT}, 133 {gfx::BufferFormat::BGRX_8888, gfx::BufferUsage::SCANOUT},
132 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::SCANOUT}, 134 {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::SCANOUT},
135 {gfx::BufferFormat::YUV_420_BIPLANAR, gfx::BufferUsage::SCANOUT},
133 }; 136 };
134 for (auto& configuration : kScanoutConfigurations) { 137 for (auto& configuration : kScanoutConfigurations) {
135 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration)) 138 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration))
136 configurations.push_back(configuration); 139 configurations.push_back(configuration);
137 } 140 }
138 #endif 141 #endif
139 142
140 return configurations; 143 return configurations;
141 } 144 }
142 145
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return gpu_client_tracing_id_; 634 return gpu_client_tracing_id_;
632 } 635 }
633 636
634 // In normal cases, |client_id| is a child process id, so we can perform 637 // In normal cases, |client_id| is a child process id, so we can perform
635 // the standard conversion. 638 // the standard conversion.
636 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( 639 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
637 client_id); 640 client_id);
638 } 641 }
639 642
640 } // namespace content 643 } // namespace content
OLDNEW
« no previous file with comments | « components/view_manager/gles2/mojo_gpu_memory_buffer.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698