DescriptionFix bug where custom cursors would disappear when screen was rotated for ozone based platforms. This was caused by commit cd0a8ae72380dc461eea58084325d9d981942192. The change modified the cursor SkBitmap to always be in unpremultiplied alpha format. However, the SkCanvas::drawBitmap() operation fails silently if the SkBitmap is in unpremultiplied format and the ui::ScaleAndRotateCursorBitmapAndHotpoint() function relies on SkCanvas::drawBitmap() to rotate the cursor. This fails and the cursor disappears.
This fix temporarily converts the cursor bitmap back to premultiplied alpha before rotating. It also adds a DCHECK to SkBitmapOperations::Rotate() to document the alpha type requirement.
BUG=533748
Committed: https://crrev.com/fd9f15be2e290d54095d1b3c6b2285d89447e984
Cr-Commit-Position: refs/heads/master@{#366423}
Patch Set 1 #Patch Set 2 : Change to actually convert SkBitmap #Patch Set 3 : Improve comments. #Patch Set 4 : Remove unnecessary CHECK() statement. #
Total comments: 2
Patch Set 5 : Fix typo in comment. #
Total comments: 2
Patch Set 6 : Fix variable name. #
Total comments: 1
Patch Set 7 : Change DCHECK to DCHECK_NE #Messages
Total messages: 24 (11 generated)
|