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

Unified Diff: ui/gfx/image/image_skia_rep.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_skia_operations.cc ('k') | ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_rep.cc
diff --git a/ui/gfx/image/image_skia_rep.cc b/ui/gfx/image/image_skia_rep.cc
index f31db600465f2fe8a95b00e3e28bfe0a5ed4c8af..8bc521423ba456c0680a532352c8dac19de45cb0 100644
--- a/ui/gfx/image/image_skia_rep.cc
+++ b/ui/gfx/image/image_skia_rep.cc
@@ -15,10 +15,8 @@ ImageSkiaRep::~ImageSkiaRep() {
}
ImageSkiaRep::ImageSkiaRep(const gfx::Size& size, float scale) : scale_(scale) {
- bitmap_.setConfig(SkBitmap::kARGB_8888_Config,
- static_cast<int>(size.width() * this->scale()),
- static_cast<int>(size.height() * this->scale()));
- bitmap_.allocPixels();
+ bitmap_.allocN32Pixels(static_cast<int>(size.width() * this->scale()),
+ static_cast<int>(size.height() * this->scale()));
bitmap_.eraseColor(SK_ColorRED);
}
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698