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

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

Issue 83093005: remove kA1_Config, as it is no longer supported (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 dumpBase(maker); 68 dumpBase(maker);
69 dumpAttrs(maker); 69 dumpAttrs(maker);
70 if (fColorSet) 70 if (fColorSet)
71 SkDebugf("erase=\"argb(%d,%d,%d,%d)\" ", SkColorGetA(fColor)/255, SkColo rGetR(fColor), 71 SkDebugf("erase=\"argb(%d,%d,%d,%d)\" ", SkColorGetA(fColor)/255, SkColo rGetR(fColor),
72 SkColorGetG(fColor), SkColorGetB(fColor)); 72 SkColorGetG(fColor), SkColorGetB(fColor));
73 if (rowBytes > 0) 73 if (rowBytes > 0)
74 SkDebugf("rowBytes=\"%d\" ", rowBytes); 74 SkDebugf("rowBytes=\"%d\" ", rowBytes);
75 const char* formatName; 75 const char* formatName;
76 switch (format) { 76 switch (format) {
77 case 0: formatName = "none"; break; 77 case 0: formatName = "none"; break;
78 case 1: formatName = "A1"; break; 78 case 1: formatName = "A8"; break;
79 case 2: formatName = "A8"; break; 79 case 2: formatName = "Index8"; break;
80 case 3: formatName = "Index8"; break; 80 case 3: formatName = "RGB16"; break;
81 case 4: formatName = "RGB16"; break; 81 case 4: formatName = "RGB32"; break;
82 case 5: formatName = "RGB32"; break;
83 } 82 }
84 SkDebugf("format=\"%s\" />\n", formatName); 83 SkDebugf("format=\"%s\" />\n", formatName);
85 } 84 }
86 #endif 85 #endif
87 86
88 void SkDrawBitmap::onEndElement(SkAnimateMaker&) { 87 void SkDrawBitmap::onEndElement(SkAnimateMaker&) {
89 SkASSERT(width != -1); 88 SkASSERT(width != -1);
90 SkASSERT(height != -1); 89 SkASSERT(height != -1);
91 SkASSERT(rowBytes >= 0); 90 SkASSERT(rowBytes >= 0);
92 fBitmap.setConfig((SkBitmap::Config) format, width, height, rowBytes); 91 fBitmap.setConfig((SkBitmap::Config) format, width, height, rowBytes);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 fLast.set(src); 187 fLast.set(src);
189 fBitmap.reset(); 188 fBitmap.reset();
190 189
191 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str()); 190 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str());
192 SkAutoTUnref<SkStreamAsset> stream(SkStream::NewFromFile(src.c_str())); 191 SkAutoTUnref<SkStreamAsset> stream(SkStream::NewFromFile(src.c_str()));
193 if (stream.get()) { 192 if (stream.get()) {
194 SkImageDecoder::DecodeStream(stream, &fBitmap); 193 SkImageDecoder::DecodeStream(stream, &fBitmap);
195 } 194 }
196 } 195 }
197 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698