Semi-transparent cursors don't work on Windows
Reported by
ivan.kuc...@gmail.com,
Apr 5 2018
|
|||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Steps to reproduce the problem: 1. Go to http://ivank.net/veci/cursors_alpha.html 2. The cursor image is http://ivank.net/veci/white_grad.png What is the expected behavior? The cursor should be semi-transparent. What went wrong? The cursor in Windows is fully opaque. Did this work before? N/A Chrome version: 65.0.3325.181 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 29.0 r0
,
Apr 6 2018
,
Apr 6 2018
The issue 647599 was also issued by me ... I completely forgot it. Is now, after two years, a better time to fix it? BTW. semi-transparent cursors work in Firefox on Windows, so I don't think it is any OS restriction.
,
Apr 11 2018
Checked the issue on reported chrome version 65.0.3325.181 using Windows 7 and Windows 10 with the below mentioned steps. 1. Launched Chrome 2. Navigated to http://ivank.net/veci/cursors_alpha.html 3. Hovered on the black space. We observed the cursor is semi transparent. Attaching the screen cast of the same. @Reporter: Could you please have a look at the screen cast and let us know if we have missed anything in the process. Any further inputs from your end may help us.
,
Apr 11 2018
Everything is correct in your video. But in my case, I see a fully white square. Maybe it depends on GPU drivers? Here is my about://gpu : https://pastebin.com/wKTeAnPt
,
Apr 11 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 27 2018
ivan.kuckir@ Thanks for the update. Retried the issue on Windows 10 on the reported version 65.0.3325.181 and the latest Canary 68.0.3410.0 and unable to reproduce the issue. On hovering the cursor over the black area, can observe the cursor is semi-transparent. Attached is the gpu details. Request you to update chrome to the latest stable 66.0.3359.117, retry the issue on a new chrome profile without any flags/extensions and update the thread with the observations. Thanks..
,
Apr 27 2018
Hi, tried it again with the latest Chrome. The problem is still here. Note, that I use Windows 7 (not 10) and my GL_RENDERER is ANGLE (Intel(R) HD Graphics 5500 Direct3D11 vs_5_0 ps_5_0)
,
Apr 27 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 27 2018
Try installing the driver from https://downloadcenter.intel.com/product/86210/Intel-HD-Graphics-5500
,
Apr 27 2018
I installed the latest driver. The cursor is still a fully opaque white rectangle :(
,
May 2 2018
Unable to reproduce the issue on Win-7 using chrome latest stable #66.0.3359.139 and latest canary #68.0.3416.0. As per comment #4 and #7 it seems that the issue is not reproducible from TE-end. Hence, requesting someone from Internals>GPU team to please have a look into the issue and adding label TE-NeedsTriageHelp for further investigation. Thanks...!!
,
Jul 20
cc'ing people who worked in cursor code.
,
Jul 27
Sounds like we are not setting the aura/hwnd window as transparent?
,
Jul 27
+kylechar@
,
Aug 17
Assigning to zmo for Windows triage.
,
Aug 21
sadrul@: can you find an owner for this? I know nothing about cursors.
,
Aug 21
I can take a look at this at some point. I found a Win7 machine the problem reproduces on, although it didn't reproduce on 3 other machines.
,
Nov 22
***Mass UI Triage*** We were unable to reproduce this bug from TE end. But as per comment #18 adding related comments for further triage. Thanks!
,
Jan 2
,
Jan 4
We had a Win7 machine that reproduced the bug, but it seems that it no longer occurs. ivan.kuckir@ does the bug still occur for you?
,
Jan 4
Yes, I just tried to install the latest Windows 7 updates, but I still see the fully white square in the latest Chrome :( In Firefox, the cursor is semi-transparent, but it is "gray in the middle" on white background (i.e. they multiply colors by alpha twice in their pipeline).
,
Jan 7
ivan: Unfortunately it's really difficult to tell what is going wrong here without being able to reproduce it. A few questions to narrow things down. 1. Can you load Chrome (without any extra flags), navigate to chrome://gpu, save that and attach it here. 2. What happens if you run Chrome with the --disable-gpu flag, does the transparent cursor work or is the same behaviour?
,
Jan 8
I tried to run Chrome with --disable-gpu without any change, so I think it is not GPU-related. I think I noticed an important detail. My "OS zoom" is 1.25 = 125% (i.e. the devicePixelRatio, when the website zoom is at 100%). When I set the same PNG as a cursor using cursor: -webkit-image-set( url(...) 1.25x ), auto; the cursor looks correctly (and it is not scaled). So I think, that your cursor-scaling algorithm ignores the transparency. This can not be reproduced by changing the page zoom. The zoom has to be at the OS level.
,
Jan 8
Ah, yes, it has to do with OS zoom (eg. device scale factor). Thanks for the information to reproduce! I can reproduce on Linux and Windows with --force-device-scale-factor=1.25. We're probably dropping the alpha channel somewhere when scaling web cursor images.
,
Jan 8
skia::ImageOperations::Resize() doesn't handle unpremul alpha properly. This is super similar to crbug.com/533748 where skia also couldn't handle rotating SkBitmap unpremul alpha. We can use the same solution, convert to premul alpha before resizing, but let me double check with someone on the skia team this is required first.
,
Jan 11
The NextAction date has arrived: 2019-01-11
,
Jan 11
https://crrev.com/c/1400356 is being reviewed currently.
,
Jan 16
(6 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ba5cf7b3d18065b934e9a55e2380450f28ad585a commit ba5cf7b3d18065b934e9a55e2380450f28ad585a Author: kylechar <kylechar@chromium.org> Date: Wed Jan 16 14:39:37 2019 Fix web cursor transparency when scaled. Custom web cursors with transparency were not displaying correctly when scaled, for example when device scale factor is not 1.0. The cursor would become fully opaque after scaling. The helper function skia::ImageOperations::Resize() doesn't appear to handle the alpha channel correctly with unpremultiplied alpha SkBitmaps. SkPixmap::scaleImage() does support unpremultiplied alpha SkBitmaps so use that instead. I filed https://crbug.com/919866 to see if skia::ImageOperations::Resize() could just use SkPixmap::scaleImage() at some point. Also add a test for ScaleAndRotateCursorBitmapAndHotpoint(). There was already a test that only ran with X11 and premultiplied alpha SkBitmap. Make the test run on all platforms and parameterize it to run with both alpha types. Bug: 829517 , 919866 Change-Id: I12213b03a2569240cf4206869906fb0834217155 Reviewed-on: https://chromium-review.googlesource.com/c/1400356 Commit-Queue: kylechar <kylechar@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#623233} [modify] https://crrev.com/ba5cf7b3d18065b934e9a55e2380450f28ad585a/content/test/content_test_suite.cc [modify] https://crrev.com/ba5cf7b3d18065b934e9a55e2380450f28ad585a/content/test/content_test_suite.h [modify] https://crrev.com/ba5cf7b3d18065b934e9a55e2380450f28ad585a/ui/base/BUILD.gn [delete] https://crrev.com/71423ee1ddfe6dc0efa722e23408d9662d97f2f6/ui/base/cursor/cursor_loader_x11_unittest.cc [modify] https://crrev.com/ba5cf7b3d18065b934e9a55e2380450f28ad585a/ui/base/cursor/cursor_util.cc [add] https://crrev.com/ba5cf7b3d18065b934e9a55e2380450f28ad585a/ui/base/cursor/cursor_util_unittest.cc
,
Jan 17
(5 days ago)
|
|||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||
Comment 1 by krajshree@chromium.org
, Apr 6 2018