Chromium Code Reviews| Index: tools/filtermain.cpp |
| =================================================================== |
| --- tools/filtermain.cpp (revision 9089) |
| +++ tools/filtermain.cpp (working copy) |
| @@ -626,14 +626,14 @@ |
| static int filter_picture(const SkString& inFile, const SkString& outFile) { |
| - SkPicture* inPicture = NULL; |
| + SkAutoTDelete<SkPicture> inPicture; |
|
bungeman-skia
2013/05/10 17:30:36
SkPicture is SkRefCnt, it seems odd to SkAutoTDele
|
| SkFILEStream inStream(inFile.c_str()); |
| if (inStream.isValid()) { |
| - inPicture = SkNEW_ARGS(SkPicture, (&inStream, NULL, &SkImageDecoder::DecodeMemory)); |
| + inPicture.reset(SkNEW_ARGS(SkPicture, (&inStream, NULL, &SkImageDecoder::DecodeMemory))); |
| } |
| - if (NULL == inPicture) { |
| + if (NULL == inPicture.get()) { |
| SkDebugf("Could not read file %s\n", inFile.c_str()); |
| return -1; |
| } |
| @@ -715,6 +715,10 @@ |
| int tool_main(int argc, char** argv); // suppress a warning on mac |
| int tool_main(int argc, char** argv) { |
| +#if SK_ENABLE_INST_COUNT |
| + gPrintInstCount = true; |
| +#endif |
| + |
|
jvanverth1
2013/05/10 14:34:46
Did you mean to leave this in there?
robertphillips
2013/05/10 14:36:18
Yep - when enabled it prints out leak info
|
| SkGraphics::Init(); |
| if (argc < 3) { |