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

Side by Side Diff: src/animator/SkDrawBitmap.cpp

Issue 1917223006: Fix warnings that were exposed when running with SK_DEBUG enable on an optimized release build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « gyp/common.gypi ('k') | src/core/SkPath.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 2006 The Android Open Source Project 3 * Copyright 2006 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 "SkDrawBitmap.h" 10 #include "SkDrawBitmap.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 #ifdef SK_DUMP_ENABLED 67 #ifdef SK_DUMP_ENABLED
68 void SkDrawBitmap::dump(SkAnimateMaker* maker) { 68 void SkDrawBitmap::dump(SkAnimateMaker* maker) {
69 dumpBase(maker); 69 dumpBase(maker);
70 dumpAttrs(maker); 70 dumpAttrs(maker);
71 if (fColorSet) 71 if (fColorSet)
72 SkDebugf("erase=\"argb(%d,%d,%d,%d)\" ", SkColorGetA(fColor)/255, SkColo rGetR(fColor), 72 SkDebugf("erase=\"argb(%d,%d,%d,%d)\" ", SkColorGetA(fColor)/255, SkColo rGetR(fColor),
73 SkColorGetG(fColor), SkColorGetB(fColor)); 73 SkColorGetG(fColor), SkColorGetB(fColor));
74 if (rowBytes > 0) 74 if (rowBytes > 0)
75 SkDebugf("rowBytes=\"%d\" ", rowBytes); 75 SkDebugf("rowBytes=\"%d\" ", rowBytes);
76 const char* formatName; 76 const char* formatName SK_INIT_TO_AVOID_WARNING;
77 switch (format) { 77 switch (format) {
78 case 0: formatName = "none"; break; 78 case 0: formatName = "none"; break;
79 case 1: formatName = "A8"; break; 79 case 1: formatName = "A8"; break;
80 case 2: formatName = "Index8"; break; 80 case 2: formatName = "Index8"; break;
81 case 3: formatName = "RGB16"; break; 81 case 3: formatName = "RGB16"; break;
82 case 4: formatName = "RGB32"; break; 82 case 4: formatName = "RGB32"; break;
83 } 83 }
84 SkDebugf("format=\"%s\" />\n", formatName); 84 SkDebugf("format=\"%s\" />\n", formatName);
85 } 85 }
86 #endif 86 #endif
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 fBitmap.reset(); 192 fBitmap.reset();
193 193
194 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str()); 194 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str());
195 sk_sp<SkData> data = SkData::MakeFromFileName(src.c_str()); 195 sk_sp<SkData> data = SkData::MakeFromFileName(src.c_str());
196 if (data) { 196 if (data) {
197 sk_sp<SkImage> image = SkImage::MakeFromEncoded(data); 197 sk_sp<SkImage> image = SkImage::MakeFromEncoded(data);
198 image->asLegacyBitmap(&fBitmap, SkImage::kRO_LegacyBitmapMode); 198 image->asLegacyBitmap(&fBitmap, SkImage::kRO_LegacyBitmapMode);
199 } 199 }
200 } 200 }
201 } 201 }
OLDNEW
« no previous file with comments | « gyp/common.gypi ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698