From b1433cff634f4de9a3aa6609e4a9594d54f498d9 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Fri, 17 Sep 2010 08:14:10 +0000 Subject: 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 --- chrome/gpu/gpu_video_decoder.cc | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'chrome/gpu') 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( - 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(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; -- cgit v1.1