| Index: content/renderer/browser_plugin/browser_plugin_backing_store.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin_backing_store.cc b/content/renderer/browser_plugin/browser_plugin_backing_store.cc
|
| index d54a18660ccf1f0a85ac101c2fa232a6b86e62b7..210b6f57a261de89d63711456b537d085684a729 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin_backing_store.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin_backing_store.cc
|
| @@ -37,10 +37,8 @@ void BrowserPluginBackingStore::PaintToBackingStore(
|
| if (bitmap_rect.IsEmpty())
|
| return;
|
|
|
| - gfx::RectF scaled_bitmap_rect = bitmap_rect;
|
| - scaled_bitmap_rect.Scale(scale_factor_);
|
| - gfx::Rect pixel_bitmap_rect =
|
| - gfx::ToFlooredRectDeprecated(scaled_bitmap_rect);
|
| + gfx::Rect pixel_bitmap_rect = gfx::ToFlooredRectDeprecated(
|
| + gfx::ScaleRect(bitmap_rect, scale_factor_));
|
|
|
| const int width = pixel_bitmap_rect.width();
|
| const int height = pixel_bitmap_rect.height();
|
| @@ -59,9 +57,8 @@ void BrowserPluginBackingStore::PaintToBackingStore(
|
| sk_bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
|
| sk_bitmap.setPixels(dib->memory());
|
| for (size_t i = 0; i < copy_rects.size(); i++) {
|
| - gfx::RectF scaled_copy_rect = copy_rects[i];
|
| - scaled_copy_rect.Scale(scale_factor_);
|
| - const gfx::Rect& pixel_copy_rect = gfx::ToEnclosingRect(scaled_copy_rect);
|
| + const gfx::Rect& pixel_copy_rect = gfx::ToEnclosingRect(
|
| + gfx::ScaleRect(copy_rects[i], scale_factor_));
|
| int x = pixel_copy_rect.x() - pixel_bitmap_rect.x();
|
| int y = pixel_copy_rect.y() - pixel_bitmap_rect.y();
|
| SkIRect srcrect = SkIRect::MakeXYWH(x, y,
|
| @@ -82,9 +79,8 @@ void BrowserPluginBackingStore::ScrollBackingStore(
|
| int dy,
|
| const gfx::Rect& clip_rect,
|
| const gfx::Size& view_size) {
|
| - gfx::RectF scaled_clip_rect = clip_rect;
|
| - scaled_clip_rect.Scale(scale_factor_);
|
| - gfx::Rect pixel_rect = gfx::ToEnclosingRect(scaled_clip_rect);
|
| + gfx::Rect pixel_rect = gfx::ToEnclosingRect(
|
| + gfx::ScaleRect(clip_rect, scale_factor_));
|
| int pixel_dx = dx * scale_factor_;
|
| int pixel_dy = dy * scale_factor_;
|
|
|
|
|