Commit 15d206e1 authored by zmo@chromium.org's avatar zmo@chromium.org

Use GPU blacklist to control accelerated video decode.

BUG=137247,142402,141500,139683
TEST=about:gpu page
Review URL: https://chromiumcodereview.appspot.com/10832356

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152167 0039d316-1c4b-4281-b951-d872f2087c98
parent 781b3b06
...@@ -82,7 +82,8 @@ cr.define('gpu', function() { ...@@ -82,7 +82,8 @@ cr.define('gpu', function() {
'multisampling': 'WebGL multisampling', 'multisampling': 'WebGL multisampling',
'flash_3d': 'Flash 3D', 'flash_3d': 'Flash 3D',
'flash_stage3d': 'Flash Stage3D', 'flash_stage3d': 'Flash Stage3D',
'texture_sharing': 'Texture Sharing' 'texture_sharing': 'Texture Sharing',
'video_decode': 'Video Decode'
}; };
var statusLabelMap = { var statusLabelMap = {
'disabled_software': 'Software only. Hardware acceleration disabled.', 'disabled_software': 'Software only. Hardware acceleration disabled.',
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
// 16. "blacklist" is a list of gpu feature strings, valid values include // 16. "blacklist" is a list of gpu feature strings, valid values include
// "accelerated_2d_canvas", "accelerated_compositing", "webgl", // "accelerated_2d_canvas", "accelerated_compositing", "webgl",
// "multisampling", "flash_3d", "flash_stage3d", "texture_sharing", // "multisampling", "flash_3d", "flash_stage3d", "texture_sharing",
// and "all". // "accelerated_video_decode", and "all".
// This field is mandatory. // This field is mandatory.
// 17. "description" has the description of the entry. // 17. "description" has the description of the entry.
// 18. "webkit_bugs" is an array of associated webkit bug numbers. // 18. "webkit_bugs" is an array of associated webkit bug numbers.
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
{ {
"name": "software rendering list", "name": "software rendering list",
// Please update the version number whenever you change this file. // Please update the version number whenever you change this file.
"version": "2.8", "version": "2.9",
"entries": [ "entries": [
{ {
"id": 1, "id": 1,
...@@ -665,6 +665,26 @@ ...@@ -665,6 +665,26 @@
"blacklist": [ "blacklist": [
"all" "all"
] ]
},
{
"id": 48,
"description": "Accelerated video decode is unavailable on Mac and Linux.",
"cr_bugs": [137247, 133828],
"exceptions": [
{
"os": {
"type": "chromeos"
}
},
{
"os": {
"type": "win"
}
}
],
"blacklist": [
"accelerated_video_decode"
]
} }
] ]
} }
...@@ -184,6 +184,9 @@ void GpuDataManagerImpl::AppendRendererCommandLine( ...@@ -184,6 +184,9 @@ void GpuDataManagerImpl::AppendRendererCommandLine(
if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) &&
!command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas))
command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) &&
!command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
} }
void GpuDataManagerImpl::AppendGpuCommandLine( void GpuDataManagerImpl::AppendGpuCommandLine(
......
...@@ -2403,18 +2403,10 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer( ...@@ -2403,18 +2403,10 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
collection->AddAudioRenderer(audio_renderer); collection->AddAudioRenderer(audio_renderer);
} }
// Accelerated video decode is not enabled by default on Linux. WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
// crbug.com/137247 if (!CommandLine::ForCurrentProcess()->HasSwitch(
bool use_accelerated_video_decode = false; switches::kDisableAcceleratedVideoDecode))
#if defined(OS_CHROMEOS) || defined(OS_WIN) context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
use_accelerated_video_decode = true;
#endif
use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableAcceleratedVideoDecode);
WebGraphicsContext3DCommandBufferImpl* context3d =
use_accelerated_video_decode ?
RenderThreadImpl::current()->GetGpuVDAContext3D() :
NULL;
if (context3d) { if (context3d) {
scoped_refptr<base::MessageLoopProxy> factories_loop = scoped_refptr<base::MessageLoopProxy> factories_loop =
RenderThreadImpl::current()->compositor_thread() ? RenderThreadImpl::current()->compositor_thread() ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment