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

Unified Diff: ui/gfx/image/image_skia_operations.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/image/image.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_operations.cc
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index 6953b59301ffa4a6584c73fa5bfbe7a9f48387d1..c7e0eecf8d5ab23a6287b94c032a06311dd85f08 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -38,9 +38,7 @@ gfx::Rect DIPToPixelBounds(gfx::Rect dip_bounds, float scale) {
// an error.
ImageSkiaRep GetErrorImageRep(float scale, const gfx::Size& pixel_size) {
SkBitmap bitmap;
- bitmap.setConfig(
- SkBitmap::kARGB_8888_Config, pixel_size.width(), pixel_size.height());
- bitmap.allocPixels();
+ bitmap.allocN32Pixels(pixel_size.width(), pixel_size.height());
bitmap.eraseColor(SK_ColorRED);
return gfx::ImageSkiaRep(bitmap, scale);
}
@@ -166,10 +164,8 @@ class TransparentImageSource : public gfx::ImageSkiaSource {
virtual ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
SkBitmap alpha;
- alpha.setConfig(SkBitmap::kARGB_8888_Config,
- image_rep.pixel_width(),
- image_rep.pixel_height());
- alpha.allocPixels();
+ alpha.allocN32Pixels(image_rep.pixel_width(),
+ image_rep.pixel_height());
alpha.eraseColor(SkColorSetARGB(alpha_ * 255, 0, 0, 0));
return ImageSkiaRep(
SkBitmapOperations::CreateMaskedBitmap(image_rep.sk_bitmap(), alpha),
« no previous file with comments | « ui/gfx/image/image.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698