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

Unified Diff: content/common/cursors/webcursor.h

Issue 1525263004: hidpi support for custom cursors in windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 | « no previous file | content/common/cursors/webcursor.cc » ('j') | content/common/cursors/webcursor_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cursors/webcursor.h
diff --git a/content/common/cursors/webcursor.h b/content/common/cursors/webcursor.h
index 3efc2ee234cd0df92d9bfe4781d5f791843e4923..b0e36cb32e4e3ee2aeccaa8971915def870a96ed 100644
--- a/content/common/cursors/webcursor.h
+++ b/content/common/cursors/webcursor.h
@@ -71,7 +71,6 @@ class CONTENT_EXPORT WebCursor {
};
WebCursor();
- explicit WebCursor(const CursorInfo& cursor_info);
~WebCursor();
// Copy constructor/assignment operator combine.
@@ -111,6 +110,12 @@ class CONTENT_EXPORT WebCursor {
// Updates |device_scale_factor_| and |rotation_| based on |display|.
void SetDisplayInfo(const gfx::Display& display);
+ float GetCursorScaleFactor();
+
+ void CreateScaledBitmapAndHotspotFromCustomData(
+ SkBitmap* bitmap,
+ gfx::Point* hotspot);
+
#elif defined(OS_WIN)
// Returns a HCURSOR representing the current WebCursor instance.
// The ownership of the HCURSOR (does not apply to external cursors) remains
@@ -147,6 +152,13 @@ class CONTENT_EXPORT WebCursor {
void CleanupPlatformData();
void SetCustomData(const SkBitmap& image);
+
+ // Fills the custom_data vector and custom_size object with the image data
+ // taken from the bitmap.
+ void CreateCustomData(const SkBitmap& bitmap,
+ std::vector<char>* custom_data,
+ gfx::Size* custom_size);
+
void ImageFromCustomData(SkBitmap* image) const;
// Clamp the hotspot to the custom image's bounds, if this is a custom cursor.
@@ -173,11 +185,13 @@ class CONTENT_EXPORT WebCursor {
#if defined(USE_AURA) && (defined(USE_X11) || defined(USE_OZONE))
// Only used for custom cursors.
ui::PlatformCursor platform_cursor_;
- float device_scale_factor_;
#elif defined(OS_WIN)
// A custom cursor created from custom bitmap data by Webkit.
HCURSOR custom_cursor_;
#endif
+#if defined(USE_AURA)
+ float device_scale_factor_;
+#endif
#if defined(USE_OZONE)
gfx::Display::Rotation rotation_;
« no previous file with comments | « no previous file | content/common/cursors/webcursor.cc » ('j') | content/common/cursors/webcursor_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698