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

Unified Diff: webkit/glue/webcursor_aurax11.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 | « ui/ui.gyp ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webcursor_aurax11.cc
diff --git a/webkit/glue/webcursor_aurax11.cc b/webkit/glue/webcursor_aurax11.cc
index 98f8d0611e256d84d2add9b9882ee12729fa07f7..584e3ef1f510ea8b18d895bf9bca6bde69fd89b9 100644
--- a/webkit/glue/webcursor_aurax11.cc
+++ b/webkit/glue/webcursor_aurax11.cc
@@ -13,6 +13,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/x/x11_util.h"
+#include "ui/gfx/point_conversions.h"
+#include "ui/gfx/size_conversions.h"
const ui::PlatformCursor WebCursor::GetPlatformCursor() {
if (platform_cursor_)
@@ -28,13 +30,15 @@ const ui::PlatformCursor WebCursor::GetPlatformCursor() {
if (scale_factor_ == 1.f) {
image = ui::SkBitmapToXcursorImage(&bitmap, hotspot_);
} else {
- gfx::Size scaled_size = custom_size_.Scale(scale_factor_);
+ gfx::Size scaled_size = gfx::ToFlooredSize(
+ custom_size_.Scale(scale_factor_));
SkBitmap scaled_bitmap = skia::ImageOperations::Resize(bitmap,
skia::ImageOperations::RESIZE_BETTER,
scaled_size.width(),
scaled_size.height());
image = ui::SkBitmapToXcursorImage(&scaled_bitmap,
- hotspot_.Scale(scale_factor_));
+ gfx::ToFlooredPoint(
+ hotspot_.Scale(scale_factor_)));
}
platform_cursor_ = ui::CreateReffedCustomXCursor(image);
return platform_cursor_;
« no previous file with comments | « ui/ui.gyp ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698