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

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

Issue 2096953002: Add BufferFormat::YVU_420 to the list of forced formats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #if defined(USE_OZONE) || defined(OS_MACOSX) 103 #if defined(USE_OZONE) || defined(OS_MACOSX)
104 // Disable native buffers only when using Mesa. 104 // Disable native buffers only when using Mesa.
105 bool force_native_gpu_read_write_formats = 105 bool force_native_gpu_read_write_formats =
106 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 106 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
107 switches::kUseGL) != gl::kGLImplementationOSMesaName; 107 switches::kUseGL) != gl::kGLImplementationOSMesaName;
108 #else 108 #else
109 bool force_native_gpu_read_write_formats = false; 109 bool force_native_gpu_read_write_formats = false;
110 #endif 110 #endif
111 if (force_native_gpu_read_write_formats) { 111 if (force_native_gpu_read_write_formats) {
112 const gfx::BufferFormat kGPUReadWriteFormats[] = { 112 const gfx::BufferFormat kGPUReadWriteFormats[] = {
113 gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_8888, 113 gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_8888,
114 gfx::BufferFormat::RGBX_8888, gfx::BufferFormat::BGRA_8888, 114 gfx::BufferFormat::RGBX_8888, gfx::BufferFormat::BGRA_8888,
115 gfx::BufferFormat::BGRX_8888, gfx::BufferFormat::UYVY_422, 115 gfx::BufferFormat::BGRX_8888, gfx::BufferFormat::UYVY_422,
116 gfx::BufferFormat::YUV_420_BIPLANAR}; 116 gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR};
117 const gfx::BufferUsage kGPUReadWriteUsages[] = { 117 const gfx::BufferUsage kGPUReadWriteUsages[] = {
118 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT}; 118 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT};
119 for (auto& format : kGPUReadWriteFormats) { 119 for (auto& format : kGPUReadWriteFormats) {
120 for (auto& usage : kGPUReadWriteUsages) { 120 for (auto& usage : kGPUReadWriteUsages) {
121 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage)) 121 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage))
122 configurations.insert(std::make_pair(format, usage)); 122 configurations.insert(std::make_pair(format, usage));
123 } 123 }
124 } 124 }
125 } 125 }
126 126
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 format(format), 739 format(format),
740 usage(usage), 740 usage(usage),
741 gpu_host_id(gpu_host_id) {} 741 gpu_host_id(gpu_host_id) {}
742 742
743 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) = 743 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) =
744 default; 744 default;
745 745
746 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {} 746 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {}
747 747
748 } // namespace content 748 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698