summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 17:46:34 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 17:46:34 +0000
commite5dd42d1b9ff1e01a8d4705974c257379b261ca6 (patch)
treec8e5bb83b2cfd003d5b2d8475c64cec29d365c80 /chrome/renderer
parentf4a0dd38f805a1ec62d1f0dc559b8ad1d96efbea (diff)
downloadchromium_src-e5dd42d1b9ff1e01a8d4705974c257379b261ca6.zip
chromium_src-e5dd42d1b9ff1e01a8d4705974c257379b261ca6.tar.gz
chromium_src-e5dd42d1b9ff1e01a8d4705974c257379b261ca6.tar.bz2
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
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/media/video_renderer_impl.cc7
1 files changed, 4 insertions, 3 deletions
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<SkScalar>(dest_rect.y()));
if (dest_rect.width() != video_size_.width() ||
dest_rect.height() != video_size_.height()) {
- matrix.preScale(
- static_cast<SkScalar>(dest_rect.width() / video_size_.width()),
- static_cast<SkScalar>(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);
}