summaryrefslogtreecommitdiffstats
path: root/webkit/glue/media
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 23:16:21 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 23:16:21 +0000
commit8b788e3e23b32d6bc49256d42314a2f6c6ea78f1 (patch)
treeca696268c8ea9a4f50e3029f3f5286a7a249b004 /webkit/glue/media
parent3e1f40e50c6bbbadffa4268beaf214df31f60123 (diff)
downloadchromium_src-8b788e3e23b32d6bc49256d42314a2f6c6ea78f1.zip
chromium_src-8b788e3e23b32d6bc49256d42314a2f6c6ea78f1.tar.gz
chromium_src-8b788e3e23b32d6bc49256d42314a2f6c6ea78f1.tar.bz2
Replace VideoDecoder::media_format() with significantly simpler width()/height() methods.
Clients don't really care about the surface type during initialization, hence its removal. Also removed a few methods from VideoRendererBase that didn't need to be there. Technically it's possible to do without width()/height() methods entirely, forcing clients to inspect VideoFrame objects for changes in dimensions and react accordingly, but that'll be a change for a different day. BUG=28206 TEST=media_unittests, unit_tests, layout_tests Review URL: http://codereview.chromium.org/7461016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/media')
-rw-r--r--webkit/glue/media/video_renderer_impl.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/webkit/glue/media/video_renderer_impl.cc b/webkit/glue/media/video_renderer_impl.cc
index 5e159fe..c05ac99 100644
--- a/webkit/glue/media/video_renderer_impl.cc
+++ b/webkit/glue/media/video_renderer_impl.cc
@@ -18,15 +18,12 @@ VideoRendererImpl::VideoRendererImpl(bool pts_logging)
VideoRendererImpl::~VideoRendererImpl() {}
bool VideoRendererImpl::OnInitialize(media::VideoDecoder* decoder) {
- video_size_.SetSize(width(), height());
- bitmap_.setConfig(SkBitmap::kARGB_8888_Config, width(), height());
- if (bitmap_.allocPixels(NULL, NULL)) {
- bitmap_.eraseRGB(0x00, 0x00, 0x00);
- return true;
- }
-
- NOTREACHED();
- return false;
+ video_size_.SetSize(decoder->width(), decoder->height());
+ bitmap_.setConfig(SkBitmap::kARGB_8888_Config,
+ decoder->width(), decoder->height());
+ bitmap_.allocPixels();
+ bitmap_.eraseRGB(0x00, 0x00, 0x00);
+ return true;
}
void VideoRendererImpl::OnStop(media::FilterCallback* callback) {