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

Unified Diff: content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc

Issue 1153163003: Add flag to enable MJPEG acceleration for video capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-4-use
Patch Set: rebase Created 5 years, 6 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
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
index 416c8a587d8df7391410f11da369782b157f6fb5..b73b0f1eb47cdd2af38c360249be71d78ce7f422 100644
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
@@ -5,6 +5,7 @@
#include "content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
@@ -13,6 +14,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/content_switches.h"
#include "media/base/video_frame.h"
namespace content {
@@ -23,6 +25,12 @@ bool VideoCaptureGpuJpegDecoder::Supported() {
// platform. Initialize() can do the real platform supporting check but it
// requires an IPC even for platforms that do not support HW decoder.
// TODO(kcwu): move this information to GpuInfo. https://crbug.com/503568
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAcceleratedMjpegDecode)) {
+ return true;
+ }
+#endif
return false;
}
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698