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

Side by Side Diff: src/images/SkImageDecoder.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/images/SkImageDecoder_ktx.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 bool SkImageDecoder::DecodeStream(SkStreamRewindable* stream, SkBitmap* bm, SkCo lorType pref, 266 bool SkImageDecoder::DecodeStream(SkStreamRewindable* stream, SkBitmap* bm, SkCo lorType pref,
267 Mode mode, Format* format) { 267 Mode mode, Format* format) {
268 SkASSERT(stream); 268 SkASSERT(stream);
269 SkASSERT(bm); 269 SkASSERT(bm);
270 270
271 bool success = false; 271 bool success = false;
272 SkImageDecoder* codec = SkImageDecoder::Factory(stream); 272 SkImageDecoder* codec = SkImageDecoder::Factory(stream);
273 273
274 if (NULL != codec) { 274 if (codec) {
275 success = codec->decode(stream, bm, pref, mode); 275 success = codec->decode(stream, bm, pref, mode);
276 if (success && format) { 276 if (success && format) {
277 *format = codec->getFormat(); 277 *format = codec->getFormat();
278 if (kUnknown_Format == *format) { 278 if (kUnknown_Format == *format) {
279 if (stream->rewind()) { 279 if (stream->rewind()) {
280 *format = GetStreamFormat(stream); 280 *format = GetStreamFormat(stream);
281 } 281 }
282 } 282 }
283 } 283 }
284 delete codec; 284 delete codec;
285 } 285 }
286 return success; 286 return success;
287 } 287 }
OLDNEW
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/images/SkImageDecoder_ktx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698