Index: content/common/cursors/webcursor_aurawin.cc |
diff --git a/content/common/cursors/webcursor_aurawin.cc b/content/common/cursors/webcursor_aurawin.cc |
index 23aec8f19a07d5d518fdcce559092b7e784cfd49..8877d45774d13d80f554f04bc256cc839e9c0806 100644 |
--- a/content/common/cursors/webcursor_aurawin.cc |
+++ b/content/common/cursors/webcursor_aurawin.cc |
@@ -18,17 +18,23 @@ ui::PlatformCursor WebCursor::GetPlatformCursor() { |
if (custom_cursor_) |
return custom_cursor_; |
- custom_cursor_ = |
- IconUtil::CreateCursorFromDIB( |
- custom_size_, |
- hotspot_, |
- !custom_data_.empty() ? &custom_data_[0] : NULL, |
- custom_data_.size()); |
- return custom_cursor_; |
-} |
+ if (custom_data_.size() == 0) |
ananta
2015/12/15 23:28:17
should this be an error condition? and hence a dch
Bret
2015/12/16 19:03:59
Done.
|
+ return 0; |
+ |
+ SkBitmap bitmap; |
+ gfx::Point hotspot; |
+ CreateScaledBitmapAndHotspotFromCustomData(&bitmap, &hotspot); |
-void WebCursor::SetDisplayInfo(const gfx::Display& display) { |
- // TODO(winguru): Add support for scaling the cursor. |
+ gfx::Size custom_size; |
+ std::vector<char> custom_data; |
+ CreateCustomData(bitmap, custom_data, custom_size); |
+ |
+ custom_cursor_ = IconUtil::CreateCursorFromDIB( |
+ custom_size, |
+ hotspot, |
+ !custom_data.empty() ? &custom_data[0] : NULL, |
+ custom_data.size()); |
+ return custom_cursor_; |
} |
void WebCursor::InitPlatformData() { |