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

Unified Diff: content/renderer/browser_plugin/browser_plugin_backing_store.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 206a46f741d19b92b9683c2d05848ea5802f58cb..e29d5b319d18a3e8e70472140026f0adf01e161f 100644
--- a/content/renderer/browser_plugin/browser_plugin_backing_store.cc
+++ b/content/renderer/browser_plugin/browser_plugin_backing_store.cc
@@ -7,6 +7,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_conversions.h"
+#include "ui/gfx/size_conversions.h"
#include "ui/surface/transport_dib.h"
namespace content {
@@ -19,7 +20,7 @@ BrowserPluginBackingStore::BrowserPluginBackingStore(
float scale_factor)
: size_(size),
scale_factor_(scale_factor) {
- gfx::Size pixel_size = size.Scale(scale_factor);
+ gfx::Size pixel_size = gfx::ToFlooredSize(size.Scale(scale_factor));
bitmap_.setConfig(SkBitmap::kARGB_8888_Config,
pixel_size.width(), pixel_size.height());
bitmap_.allocPixels();
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698