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

Unified Diff: ui/gfx/icon_util.cc

Issue 361643002: setConfig is deprecated, use setInfo or allocPixels instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't call allocPixels+rowbytes yet (skia bug) Created 6 years, 6 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/color_utils.cc ('k') | ui/gfx/icon_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util.cc
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index dd2b9bd6b50f0ed5082f7696736c9335306efe61..70e63c43f3a945c6fe59be83c42edef36d0bf1ac 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -77,7 +77,7 @@ bool BuildResizedImageFamily(const gfx::ImageFamily& image_family,
SkBitmap best_bitmap = best->AsBitmap();
// Only kARGB_8888 images are supported.
// This will also filter out images with no pixels.
- if (best_bitmap.colorType() != kPMColor_SkColorType)
+ if (best_bitmap.colorType() != kN32_SkColorType)
return false;
SkBitmap resized_bitmap = skia::ImageOperations::Resize(
best_bitmap, skia::ImageOperations::RESIZE_LANCZOS3,
@@ -119,7 +119,7 @@ bool ConvertImageFamilyToBitmaps(
// Only 32 bit ARGB bitmaps are supported. We also make sure the bitmap has
// been properly initialized.
SkAutoLockPixels bitmap_lock(bitmap);
- if ((bitmap.colorType() != kPMColor_SkColorType) ||
+ if ((bitmap.colorType() != kN32_SkColorType) ||
(bitmap.getPixels() == NULL)) {
return false;
}
@@ -166,7 +166,7 @@ HICON IconUtil::CreateHICONFromSkBitmap(const SkBitmap& bitmap) {
// Only 32 bit ARGB bitmaps are supported. We also try to perform as many
// validations as we can on the bitmap.
SkAutoLockPixels bitmap_lock(bitmap);
- if ((bitmap.colorType() != kPMColor_SkColorType) ||
+ if ((bitmap.colorType() != kN32_SkColorType) ||
(bitmap.width() <= 0) || (bitmap.height() <= 0) ||
(bitmap.getPixels() == NULL))
return NULL;
« no previous file with comments | « ui/gfx/color_utils.cc ('k') | ui/gfx/icon_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698