diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 08:14:10 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 08:14:10 +0000 |
commit | b1433cff634f4de9a3aa6609e4a9594d54f498d9 (patch) | |
tree | 6a1ea38e0d82dc047f09afc60bb1f3f022c1df8b /chrome/gpu | |
parent | fe7d3538c5d10da514d8d8419e710b0833cda353 (diff) | |
download | chromium_src-b1433cff634f4de9a3aa6609e4a9594d54f498d9.zip chromium_src-b1433cff634f4de9a3aa6609e4a9594d54f498d9.tar.gz chromium_src-b1433cff634f4de9a3aa6609e4a9594d54f498d9.tar.bz2 |
Add IPC messages for allocation video frames for hardware video decoder
Allocation of video frames should be originated from the VideoDecodeEngine in
the GPU process. Adding messages that will allow allocation be done during
runtime instead of initialization.
Also did some cleanup in gpu_video_common.cc.
BUG=53714
TEST=Tree is green
Review URL: http://codereview.chromium.org/3361017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_video_decoder.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/chrome/gpu/gpu_video_decoder.cc b/chrome/gpu/gpu_video_decoder.cc index 1abe7dd..bcdce82 100644 --- a/chrome/gpu/gpu_video_decoder.cc +++ b/chrome/gpu/gpu_video_decoder.cc @@ -106,19 +106,9 @@ void GpuVideoDecoder::OnInitializeComplete(const VideoCodecInfo& info) { } // Translate surface type. - param.surface_type = static_cast<GpuVideoDecoderInitDoneParam::SurfaceType>( - info.stream_info.surface_type); - - // Translate surface format. - switch (info.stream_info.surface_format) { - case VideoFrame::YV12: - param.format = GpuVideoDecoderInitDoneParam::SurfaceFormat_YV12; - break; - case VideoFrame::RGBA: - param.format = GpuVideoDecoderInitDoneParam::SurfaceFormat_RGBA; - default: - NOTREACHED(); - } + // TODO(hclam): Remove |surface_type| since we are always passing textures. + param.surface_type = static_cast<int>(info.stream_info.surface_type); + param.format = info.stream_info.surface_format; // TODO(jiesun): Check the assumption of input size < original size. param.input_buffer_size = config_.width * config_.height * 3 / 2; |