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.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..75bc9fa2bd535e68a474b9f5f00621ee96ab3fe2 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,11 @@ class CONTENT_EXPORT WebCursor {
// Updates |device_scale_factor_| and |rotation_| based on |display|.
void SetDisplayInfo(const gfx::Display& display);
+ float GetCursorScaleFactor();
+ void CreateScaledBitmapAndHotspotFromCustomData(
ananta 2015/12/15 23:28:17 Newline between functions
Bret 2015/12/16 19:03:59 Done.
+ SkBitmap* bitmap,
ananta 2015/12/15 23:28:17 Fix indent to 4 spaces.
Bret 2015/12/16 19:03:59 Done.
+ 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 +151,9 @@ class CONTENT_EXPORT WebCursor {
void CleanupPlatformData();
void SetCustomData(const SkBitmap& image);
+ void CreateCustomData(const SkBitmap& bitmap,
ananta 2015/12/15 23:28:17 Newline between functions
ananta 2015/12/15 23:28:17 Some comments for this function would be helpful.
Bret 2015/12/16 19:03:59 Done.
Bret 2015/12/16 19:03:59 Done.
+ std::vector<char>& custom_data,
ananta 2015/12/15 23:28:17 We don't use reference parameters for output as pe
Bret 2015/12/16 19:03:59 Done.
+ 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 +180,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)
ananta 2015/12/15 23:28:17 USE_AURA is no longer optional. So remove the ifde
Bret 2015/12/16 19:03:58 This file is used by mac so the check needs to sta
+ 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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698