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

Unified Diff: ui/gfx/skbitmap_operations.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (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: ui/gfx/skbitmap_operations.cc
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
index cfb44da330b08be71536ded62191cb3f8a8f2478..bccff77c542d34523a685dfb55d0bde49febc082 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -119,12 +119,10 @@ SkBitmap SkBitmapOperations::CreateMaskedBitmap(const SkBitmap& rgb,
SkColor alpha_pixel = SkUnPreMultiply::PMColorToColor(alpha_row[x]);
int alpha = SkAlphaMul(SkColorGetA(rgb_pixel),
SkAlpha255To256(SkColorGetA(alpha_pixel)));
- int alpha_256 = SkAlpha255To256(alpha);
- dst_row[x] = SkColorSetARGB(alpha,
- SkAlphaMul(SkColorGetR(rgb_pixel), alpha_256),
- SkAlphaMul(SkColorGetG(rgb_pixel), alpha_256),
- SkAlphaMul(SkColorGetB(rgb_pixel),
- alpha_256));
+ dst_row[x] = SkPreMultiplyARGB(alpha,
+ SkColorGetR(rgb_pixel),
+ SkColorGetG(rgb_pixel),
+ SkColorGetB(rgb_pixel));
}
}

Powered by Google App Engine
This is Rietveld 408576698