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

Unified Diff: ui/gfx/skbitmap_operations.cc

Issue 1142113002: Remove SK_SUPPORT_LEGACY_PUBLIC_IMAGEINFO_FIELDS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 7 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 | « ui/gfx/ipc/gfx_param_traits.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 76aa763fa43905a6a20a1ecfe74276f4349ed929..d608c8dd0f4f80f6dff26d2c80bdd42759847419 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -654,10 +654,12 @@ SkBitmap SkBitmapOperations::UnPreMultiply(const SkBitmap& bitmap) {
if (bitmap.isOpaque())
return bitmap;
- SkImageInfo info = bitmap.info();
- info.fAlphaType = kOpaque_SkAlphaType;
+ const SkImageInfo& info = bitmap.info();
+ SkImageInfo opaque_info =
+ SkImageInfo::Make(info.width(), info.height(), info.colorType(),
+ kOpaque_SkAlphaType, info.profileType());
SkBitmap opaque_bitmap;
- opaque_bitmap.allocPixels(info);
+ opaque_bitmap.allocPixels(opaque_info);
{
SkAutoLockPixels bitmap_lock(bitmap);
« no previous file with comments | « ui/gfx/ipc/gfx_param_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698