Index: content/browser/renderer_host/gpu_jpeg_decoder.cc |
diff --git a/content/browser/renderer_host/gpu_jpeg_decoder.cc b/content/browser/renderer_host/gpu_jpeg_decoder.cc |
index 362dbfda525f2fe8d61f777a62690df189ed609f..ba44386e75a3898b19d86b087eb1ffc015109599 100644 |
--- a/content/browser/renderer_host/gpu_jpeg_decoder.cc |
+++ b/content/browser/renderer_host/gpu_jpeg_decoder.cc |
@@ -5,12 +5,14 @@ |
#include "content/browser/renderer_host/gpu_jpeg_decoder.h" |
#include "base/bind.h" |
+#include "base/command_line.h" |
#include "base/logging.h" |
#include "base/strings/stringprintf.h" |
#include "base/trace_event/trace_event.h" |
#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 { |
@@ -21,6 +23,12 @@ bool GpuJpegDecoder::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. |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableAcceleratedMjpegDecode)) { |
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
piman
2015/06/08 21:25:03
nit: do you want to move the #ifdef around the swi
kcwu
2015/06/09 09:05:13
Done.
|
+ return true; |
+#endif |
+ } |
return false; |
} |