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

Unified Diff: ui/gfx/skbitmap_operations.cc

Issue 1514723003: Fix bug where custom cursors would dissappear when screen was rotated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change DCHECK to DCHECK_NE Created 5 years 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 | « ui/base/cursor/cursor_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skbitmap_operations.cc
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
index a12ef83f5b2fec4be1467e9c8eef71fbb44fd996..7d16bff29c9d4ca4ab23142f1274b85364aaa957 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -757,6 +757,9 @@ SkBitmap SkBitmapOperations::CreateDropShadow(
// static
SkBitmap SkBitmapOperations::Rotate(const SkBitmap& source,
RotationAmount rotation) {
+ // SkCanvas::drawBitmap() fails silently with unpremultiplied SkBitmap.
+ DCHECK_NE(source.info().alphaType(), kUnpremul_SkAlphaType);
+
SkBitmap result;
SkScalar angle = SkFloatToScalar(0.0f);
« no previous file with comments | « ui/base/cursor/cursor_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698