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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. Created 4 years, 2 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 <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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 NOTREACHED(); 64 NOTREACHED();
65 return false; 65 return false;
66 } 66 }
67 } 67 }
68 68
69 GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations() { 69 GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations() {
70 GpuMemoryBufferConfigurationSet configurations; 70 GpuMemoryBufferConfigurationSet configurations;
71 71
72 if (BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled()) { 72 if (BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled()) {
73 const gfx::BufferFormat kNativeFormats[] = { 73 const gfx::BufferFormat kNativeFormats[] = {
74 gfx::BufferFormat::R_8, gfx::BufferFormat::BGR_565, 74 gfx::BufferFormat::R_8,
75 gfx::BufferFormat::RGBA_4444, gfx::BufferFormat::RGBA_8888, 75 gfx::BufferFormat::RG_88,
76 gfx::BufferFormat::BGRA_8888, gfx::BufferFormat::UYVY_422, 76 gfx::BufferFormat::BGR_565,
77 gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR}; 77 gfx::BufferFormat::RGBA_4444,
78 gfx::BufferFormat::RGBA_8888,
79 gfx::BufferFormat::BGRA_8888,
80 gfx::BufferFormat::UYVY_422,
81 gfx::BufferFormat::YVU_420,
82 gfx::BufferFormat::YUV_420_BIPLANAR};
78 const gfx::BufferUsage kNativeUsages[] = { 83 const gfx::BufferUsage kNativeUsages[] = {
79 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT, 84 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT,
80 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, 85 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
81 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT}; 86 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT};
82 for (auto& format : kNativeFormats) { 87 for (auto& format : kNativeFormats) {
83 for (auto& usage : kNativeUsages) { 88 for (auto& usage : kNativeUsages) {
84 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage)) 89 if (IsNativeGpuMemoryBufferFactoryConfigurationSupported(format, usage))
85 configurations.insert(std::make_pair(format, usage)); 90 configurations.insert(std::make_pair(format, usage));
86 } 91 }
87 } 92 }
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 format(format), 701 format(format),
697 usage(usage), 702 usage(usage),
698 gpu_host_id(gpu_host_id) {} 703 gpu_host_id(gpu_host_id) {}
699 704
700 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) = 705 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) =
701 default; 706 default;
702 707
703 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {} 708 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {}
704 709
705 } // namespace content 710 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698