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

Side by Side Diff: src/core/SkBitmap.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 | « no previous file | src/images/SkDecodingImageGenerator.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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 return true; 253 return true;
254 } 254 }
255 255
256 bool SkBitmap::setConfig(const SkImageInfo& info, size_t rowBytes) { 256 bool SkBitmap::setConfig(const SkImageInfo& info, size_t rowBytes) {
257 // require that rowBytes fit in 31bits 257 // require that rowBytes fit in 31bits
258 int64_t mrb = info.minRowBytes64(); 258 int64_t mrb = info.minRowBytes64();
259 if ((int32_t)mrb != mrb) { 259 if ((int32_t)mrb != mrb) {
260 return reset_return_false(this); 260 return reset_return_false(this);
261 } 261 }
262 if ((ssize_t)rowBytes != (int32_t)rowBytes) { 262 if ((int64_t)rowBytes != (int32_t)rowBytes) {
263 return reset_return_false(this); 263 return reset_return_false(this);
264 } 264 }
265 265
266 if (info.isEmpty()) { 266 if (info.isEmpty()) {
267 return reset_return_false(this); 267 return reset_return_false(this);
268 } 268 }
269 269
270 if (kUnknown_SkColorType == info.colorType()) { 270 if (kUnknown_SkColorType == info.colorType()) {
271 rowBytes = 0; 271 rowBytes = 0;
272 } else if (0 == rowBytes) { 272 } else if (0 == rowBytes) {
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1685
1686 #ifdef SK_DEBUG 1686 #ifdef SK_DEBUG
1687 void SkImageInfo::validate() const { 1687 void SkImageInfo::validate() const {
1688 SkASSERT(fWidth >= 0); 1688 SkASSERT(fWidth >= 0);
1689 SkASSERT(fHeight >= 0); 1689 SkASSERT(fHeight >= 0);
1690 SkASSERT(SkColorTypeIsValid(fColorType)); 1690 SkASSERT(SkColorTypeIsValid(fColorType));
1691 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); 1691 SkASSERT(SkAlphaTypeIsValid(fAlphaType));
1692 } 1692 }
1693 #endif 1693 #endif
1694 1694
OLDNEW
« no previous file with comments | « no previous file | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698