From 1ffca254514b4da587e46d1367b217eca22d5932 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Fri, 8 Oct 2010 05:39:12 +0000 Subject: Fix build failure. TBR=scherkus BUG=None TEST=None Review URL: http://codereview.chromium.org/3516024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61921 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/gpu/gpu_video_decoder.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chrome') diff --git a/chrome/gpu/gpu_video_decoder.cc b/chrome/gpu/gpu_video_decoder.cc index 5ae7dfc..0cd9d14 100644 --- a/chrome/gpu/gpu_video_decoder.cc +++ b/chrome/gpu/gpu_video_decoder.cc @@ -4,7 +4,9 @@ #include "chrome/gpu/gpu_video_decoder.h" +#include "base/command_line.h" #include "chrome/common/child_thread.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/gpu_messages.h" #include "chrome/gpu/gpu_channel.h" #include "chrome/gpu/media/fake_gl_video_decode_engine.h" @@ -236,8 +238,11 @@ GpuVideoDecoder::GpuVideoDecoder( // TODO(jiesun): find a better way to determine which VideoDecodeEngine // to return on current platform. #if defined(OS_WIN) - decode_engine_.reset(new media::MftH264DecodeEngine(true)); - video_device_.reset(new MftAngleVideoDevice()); + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + if (command_line.HasSwitch(switches::kEnableAcceleratedDecoding)) { + decode_engine_.reset(new media::MftH264DecodeEngine(true)); + video_device_.reset(new MftAngleVideoDevice()); + } #else decode_engine_.reset(new FakeGlVideoDecodeEngine()); video_device_.reset(new FakeGlVideoDevice()); -- cgit v1.1