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

Unified Diff: content/common/cursors/webcursor_mac.mm

Issue 1416023002: Fix custom cursor transparency compositing on MacOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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
Index: content/common/cursors/webcursor_mac.mm
diff --git a/content/common/cursors/webcursor_mac.mm b/content/common/cursors/webcursor_mac.mm
index cd12a33a8256f938cce303982a8de3ab4414978b..57883bdb55a0eb6da4e9cbd408e5069e53bf8231 100644
--- a/content/common/cursors/webcursor_mac.mm
+++ b/content/common/cursors/webcursor_mac.mm
@@ -151,7 +151,8 @@ NSCursor* CreateCustomCursor(const std::vector<char>& custom_data,
}
SkBitmap bitmap;
- if (bitmap.tryAllocN32Pixels(size.width(), size.height()) && data)
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(size.width(), size.height(), kUnpremul_SkAlphaType);
Avi (use Gerrit) 2015/10/21 04:30:55 80 columns, please
+ if (bitmap.tryAllocPixels(imageInfo) && data)
memcpy(bitmap.getAddr32(0, 0), data, data_size);
else
bitmap.eraseARGB(0, 0, 0, 0);
« no previous file with comments | « no previous file | content/common/cursors/webcursor_unittest.cc » ('j') | content/common/cursors/webcursor_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698