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

Unified Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.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: rebase 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/renderer_gpu_video_accelerator_factories.cc
diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
index 754c1006cc99f6ff22b45c8d2be9a99d8e28332d..3d7730426ebbe8a748e11c353aab6d2bdafcba24 100644
--- a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
+++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
@@ -246,12 +246,17 @@ unsigned RendererGpuVideoAcceleratorFactories::ImageTextureTarget(
}
media::GpuVideoAcceleratorFactories::OutputFormat
-RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat() {
+RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat(
+ media::VideoPixelFormat format) {
DCHECK(task_runner_->BelongsToCurrentThread());
if (CheckContextLost())
return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
cc::ContextProvider::ScopedContextLock lock(context_provider_);
auto capabilities = context_provider_->ContextCapabilities();
+ if (format == media::PIXEL_FORMAT_Y16)
+ return capabilities.texture_rg
+ ? media::GpuVideoAcceleratorFactories::OutputFormat::Y16
+ : media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
if (capabilities.image_ycbcr_420v)
return media::GpuVideoAcceleratorFactories::OutputFormat::NV12_SINGLE_GMB;
if (capabilities.image_ycbcr_422)
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.h ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698