summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/media/video_renderer_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/media/video_renderer_impl.cc')
-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);
}