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

Side by Side Diff: src/image/SkImagePriv.cpp

Issue 22875037: My clang now doesn't complain about !"foo". (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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/gpu/gl/GrGpuGL_program.cpp ('k') | src/images/SkImageDecoder.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 2012 Google Inc. 2 * Copyright 2012 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 "SkImagePriv.h" 8 #include "SkImagePriv.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return SkBitmap::kNo_Config; 47 return SkBitmap::kNo_Config;
48 case SkImage::kOpaque_AlphaType: 48 case SkImage::kOpaque_AlphaType:
49 *isOpaque = true; 49 *isOpaque = true;
50 return SkBitmap::kARGB_8888_Config; 50 return SkBitmap::kARGB_8888_Config;
51 case SkImage::kPremul_AlphaType: 51 case SkImage::kPremul_AlphaType:
52 *isOpaque = false; 52 *isOpaque = false;
53 return SkBitmap::kARGB_8888_Config; 53 return SkBitmap::kARGB_8888_Config;
54 } 54 }
55 break; 55 break;
56 } 56 }
57 SkASSERT(!"how did we get here"); 57 SkDEBUGFAIL("how did we get here");
58 return SkBitmap::kNo_Config; 58 return SkBitmap::kNo_Config;
59 } 59 }
60 60
61 int SkImageBytesPerPixel(SkImage::ColorType ct) { 61 int SkImageBytesPerPixel(SkImage::ColorType ct) {
62 static const uint8_t gColorTypeBytesPerPixel[] = { 62 static const uint8_t gColorTypeBytesPerPixel[] = {
63 1, // kAlpha_8_ColorType 63 1, // kAlpha_8_ColorType
64 2, // kRGB_565_ColorType 64 2, // kRGB_565_ColorType
65 4, // kRGBA_8888_ColorType 65 4, // kRGBA_8888_ColorType
66 4, // kBGRA_8888_ColorType 66 4, // kBGRA_8888_ColorType
67 4, // kPMColor_ColorType 67 4, // kPMColor_ColorType
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 canvas->save(); 164 canvas->save();
165 } 165 }
166 canvas->concat(matrix); 166 canvas->concat(matrix);
167 if (!paint || !needs_layer(*paint)) { 167 if (!paint || !needs_layer(*paint)) {
168 canvas->clipRect(tmpSrc); 168 canvas->clipRect(tmpSrc);
169 } 169 }
170 170
171 canvas->drawPicture(*picture); 171 canvas->drawPicture(*picture);
172 canvas->restoreToCount(saveCount); 172 canvas->restoreToCount(saveCount);
173 } 173 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698