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

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: fix indent 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
« no previous file with comments | « no previous file | content/common/cursors/webcursor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..be38f789aee9894be3dc648fee216aab7cc68ab2 100644
--- a/content/common/cursors/webcursor_mac.mm
+++ b/content/common/cursors/webcursor_mac.mm
@@ -151,7 +151,9 @@ NSCursor* CreateCustomCursor(const std::vector<char>& custom_data,
}
SkBitmap bitmap;
- if (bitmap.tryAllocN32Pixels(size.width(), size.height()) && data)
+ SkImageInfo image_info = SkImageInfo::MakeN32(size.width(), size.height(),
+ kUnpremul_SkAlphaType);
+ if (bitmap.tryAllocPixels(image_info) && 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698