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

Unified Diff: ui/gfx/codec/jpeg_codec.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/android/java_bitmap.cc ('k') | ui/gfx/codec/png_codec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/jpeg_codec.cc
diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc
index a99381636724dc48c510bfad3ea6f7146b9ebfdc..5c13e5091d9b9ab2792fe31889ac383bc741b9f9 100644
--- a/ui/gfx/codec/jpeg_codec.cc
+++ b/ui/gfx/codec/jpeg_codec.cc
@@ -622,8 +622,7 @@ SkBitmap* JPEGCodec::Decode(const unsigned char* input, size_t input_size) {
int data_length = w * h * 4;
SkBitmap* bitmap = new SkBitmap();
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, w, h);
- bitmap->allocPixels();
+ bitmap->allocN32Pixels(w, h);
memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length);
return bitmap;
« no previous file with comments | « ui/gfx/android/java_bitmap.cc ('k') | ui/gfx/codec/png_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698