summaryrefslogtreecommitdiffstats
path: root/ui/base/cursor/cursor_loader_x11.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/cursor/cursor_loader_x11.cc')
-rw-r--r--ui/base/cursor/cursor_loader_x11.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/base/cursor/cursor_loader_x11.cc b/ui/base/cursor/cursor_loader_x11.cc
index 9c2f609..0161da2 100644
--- a/ui/base/cursor/cursor_loader_x11.cc
+++ b/ui/base/cursor/cursor_loader_x11.cc
@@ -159,11 +159,12 @@ void CursorLoaderX11::LoadImageCursor(int id,
const gfx::Point& hot) {
const gfx::ImageSkia* image =
ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id);
- const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(scale());
+ const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(
+ display().device_scale_factor());
SkBitmap bitmap = image_rep.sk_bitmap();
gfx::Point hotpoint = hot;
ScaleAndRotateCursorBitmapAndHotpoint(
- scale(), rotation(), &bitmap, &hotpoint);
+ scale(), display().rotation(), &bitmap, &hotpoint);
XcursorImage* x_image = SkBitmapToXcursorImage(&bitmap, hotpoint);
cursors_[id] = CreateReffedCustomXCursor(x_image);
@@ -176,7 +177,8 @@ void CursorLoaderX11::LoadAnimatedCursor(int id,
int frame_delay_ms) {
const gfx::ImageSkia* image =
ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id);
- const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(scale());
+ const gfx::ImageSkiaRep& image_rep = image->GetRepresentation(
+ display().device_scale_factor());
SkBitmap bitmap = image_rep.sk_bitmap();
int frame_width = bitmap.height();
int frame_height = frame_width;
@@ -231,7 +233,8 @@ void CursorLoaderX11::SetPlatformCursor(gfx::NativeCursor* cursor) {
xcursor = invisible_cursor_.get();
else if (*cursor == kCursorCustom)
xcursor = cursor->platform();
- else if (scale() == 1.0f && rotation() == gfx::Display::ROTATE_0) {
+ else if (display().device_scale_factor() == 1.0f &&
+ display().rotation() == gfx::Display::ROTATE_0) {
xcursor = GetXCursor(CursorShapeFromNative(*cursor));
} else {
xcursor = ImageCursorFromNative(kCursorPointer);