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

Unified Diff: ui/gfx/codec/png_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/codec/jpeg_codec.cc ('k') | ui/gfx/codec/png_codec_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/png_codec.cc
diff --git a/ui/gfx/codec/png_codec.cc b/ui/gfx/codec/png_codec.cc
index d098eb4ee188a55e33a5760485a2e4a22cd70d0b..1bf2aad717e4229300745dab62e9f0d435415d52 100644
--- a/ui/gfx/codec/png_codec.cc
+++ b/ui/gfx/codec/png_codec.cc
@@ -276,9 +276,7 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) {
png_read_update_info(png_ptr, info_ptr);
if (state->bitmap) {
- state->bitmap->setConfig(SkBitmap::kARGB_8888_Config,
- state->width, state->height);
- state->bitmap->allocPixels();
+ state->bitmap->allocN32Pixels(state->width, state->height);
} else if (state->output) {
state->output->resize(
state->width * state->output_channels * state->height);
« no previous file with comments | « ui/gfx/codec/jpeg_codec.cc ('k') | ui/gfx/codec/png_codec_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698