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

Unified Diff: Source/core/platform/chromium/support/WebCursorInfo.cpp

Issue 105363002: Make SVG images for custom CSS cursors appear sharp on retina displays (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 7 years 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 | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/platform/graphics/BitmapImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/chromium/support/WebCursorInfo.cpp
===================================================================
--- Source/core/platform/chromium/support/WebCursorInfo.cpp (revision 162906)
+++ Source/core/platform/chromium/support/WebCursorInfo.cpp (working copy)
@@ -46,6 +46,11 @@
, externalHandle(0)
#endif
{
+ if (cursor.image()) {
+ float hintedScale = customImage.getSkBitmap().width() / (float)cursor.image()->width();
+ imageScaleFactor *= hintedScale;
+ hotSpot = WebPoint(hotSpot.x * hintedScale, hotSpot.y * hintedScale);
+ }
}
} // namespace blink
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/platform/graphics/BitmapImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698