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

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

Issue 153003005: fix warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkDecodingImageGenerator.h" 9 #include "SkDecodingImageGenerator.h"
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } else { 268 } else {
269 config = SkColorTypeToBitmapConfig(opts.fRequestedColorType); 269 config = SkColorTypeToBitmapConfig(opts.fRequestedColorType);
270 if (!bitmap.canCopyTo(config)) { 270 if (!bitmap.canCopyTo(config)) {
271 SkASSERT(bitmap.config() != config); 271 SkASSERT(bitmap.config() != config);
272 return NULL; // Can not translate to needed config. 272 return NULL; // Can not translate to needed config.
273 } 273 }
274 info.fWidth = bitmap.width(); 274 info.fWidth = bitmap.width();
275 info.fHeight = bitmap.height(); 275 info.fHeight = bitmap.height();
276 info.fColorType = opts.fRequestedColorType; 276 info.fColorType = opts.fRequestedColorType;
277 info.fAlphaType = bitmap.alphaType(); 277 info.fAlphaType = bitmap.alphaType();
278
279 // Sanity check.
280 SkDEBUGCODE(SkColorType tmp;)
281 SkASSERT(tmp == opts.fRequestedColorType);
282 } 278 }
283 return SkNEW_ARGS(SkDecodingImageGenerator, 279 return SkNEW_ARGS(SkDecodingImageGenerator,
284 (data, autoStream.detach(), info, 280 (data, autoStream.detach(), info,
285 opts.fSampleSize, opts.fDitherImage, config)); 281 opts.fSampleSize, opts.fDitherImage, config));
286 } 282 }
OLDNEW
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698