From e5dd42d1b9ff1e01a8d4705974c257379b261ca6 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Thu, 26 Mar 2009 17:46:34 +0000 Subject: TBR=ralphl, scherkus VideoRendererImpl did an incorrect scaling matrix, resulting in no video image drawn. Review URL: http://codereview.chromium.org/42647 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12566 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/media/video_renderer_impl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chrome/renderer') diff --git a/chrome/renderer/media/video_renderer_impl.cc b/chrome/renderer/media/video_renderer_impl.cc index ac7a841..542959f 100644 --- a/chrome/renderer/media/video_renderer_impl.cc +++ b/chrome/renderer/media/video_renderer_impl.cc @@ -42,9 +42,10 @@ void VideoRendererImpl::Paint(skia::PlatformCanvas* canvas, static_cast(dest_rect.y())); if (dest_rect.width() != video_size_.width() || dest_rect.height() != video_size_.height()) { - matrix.preScale( - static_cast(dest_rect.width() / video_size_.width()), - static_cast(dest_rect.height() / video_size_.height())); + matrix.preScale(SkIntToScalar(dest_rect.width()) / + SkIntToScalar(video_size_.width()), + SkIntToScalar(dest_rect.height()) / + SkIntToScalar(video_size_.height())); } canvas->drawBitmapMatrix(bitmap_, matrix, NULL); } -- cgit v1.1