Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: content/browser/renderer_host/backing_store_mac.mm

Issue 10996037: Do not convert from RectF to Rect by flooring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/backing_store_mac.mm
diff --git a/content/browser/renderer_host/backing_store_mac.mm b/content/browser/renderer_host/backing_store_mac.mm
index 592e85c30adefc29cb13b084260521d849f527c2..9bb8b6d56ffa616723f2da36be86048b6fe03b57 100644
--- a/content/browser/renderer_host/backing_store_mac.mm
+++ b/content/browser/renderer_host/backing_store_mac.mm
@@ -16,6 +16,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/scoped_cg_context_save_gstate_mac.h"
#include "ui/surface/transport_dib.h"
@@ -85,7 +86,8 @@ void BackingStoreMac::PaintToBackingStore(
return;
gfx::Size pixel_size = size().Scale(device_scale_factor_);
- gfx::Rect pixel_bitmap_rect = bitmap_rect.Scale(scale_factor);
+ gfx::Rect pixel_bitmap_rect =
+ gfx::ToEnclosingRect(bitmap_rect.Scale(scale_factor));
size_t bitmap_byte_count =
pixel_bitmap_rect.width() * pixel_bitmap_rect.height() * 4;
@@ -104,7 +106,8 @@ void BackingStoreMac::PaintToBackingStore(
for (size_t i = 0; i < copy_rects.size(); i++) {
const gfx::Rect& copy_rect = copy_rects[i];
- gfx::Rect pixel_copy_rect = copy_rect.Scale(scale_factor);
+ gfx::Rect pixel_copy_rect =
+ gfx::ToEnclosingRect(copy_rect.Scale(scale_factor));
// Only the subpixels given by copy_rect have pixels to copy.
base::mac::ScopedCFTypeRef<CGImageRef> image(
« no previous file with comments | « content/browser/renderer_host/backing_store_aura.cc ('k') | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698