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

Side by Side Diff: tools/skdiff_image.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 | « tools/render_pictures_main.cpp ('k') | tools/skdiff_main.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 #include "skdiff.h" 7 #include "skdiff.h"
8 #include "skdiff_utils.h" 8 #include "skdiff_utils.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 19 matching lines...) Expand all
30 30
31 drp->fBase.fFilename = baseFile; 31 drp->fBase.fFilename = baseFile;
32 drp->fBase.fFullPath = baseFile; 32 drp->fBase.fFullPath = baseFile;
33 drp->fBase.fStatus = DiffResource::kSpecified_Status; 33 drp->fBase.fStatus = DiffResource::kSpecified_Status;
34 34
35 drp->fComparison.fFilename = comparisonFile; 35 drp->fComparison.fFilename = comparisonFile;
36 drp->fComparison.fFullPath = comparisonFile; 36 drp->fComparison.fFullPath = comparisonFile;
37 drp->fComparison.fStatus = DiffResource::kSpecified_Status; 37 drp->fComparison.fStatus = DiffResource::kSpecified_Status;
38 38
39 SkAutoDataUnref baseFileBits(read_file(drp->fBase.fFullPath.c_str())); 39 SkAutoDataUnref baseFileBits(read_file(drp->fBase.fFullPath.c_str()));
40 if (NULL != baseFileBits) { 40 if (baseFileBits) {
41 drp->fBase.fStatus = DiffResource::kRead_Status; 41 drp->fBase.fStatus = DiffResource::kRead_Status;
42 } 42 }
43 SkAutoDataUnref comparisonFileBits(read_file(drp->fComparison.fFullPath.c_st r())); 43 SkAutoDataUnref comparisonFileBits(read_file(drp->fComparison.fFullPath.c_st r()));
44 if (NULL != comparisonFileBits) { 44 if (comparisonFileBits) {
45 drp->fComparison.fStatus = DiffResource::kRead_Status; 45 drp->fComparison.fStatus = DiffResource::kRead_Status;
46 } 46 }
47 if (NULL == baseFileBits || NULL == comparisonFileBits) { 47 if (NULL == baseFileBits || NULL == comparisonFileBits) {
48 if (NULL == baseFileBits) { 48 if (NULL == baseFileBits) {
49 drp->fBase.fStatus = DiffResource::kCouldNotRead_Status; 49 drp->fBase.fStatus = DiffResource::kCouldNotRead_Status;
50 } 50 }
51 if (NULL == comparisonFileBits) { 51 if (NULL == comparisonFileBits) {
52 drp->fComparison.fStatus = DiffResource::kCouldNotRead_Status; 52 drp->fComparison.fStatus = DiffResource::kCouldNotRead_Status;
53 } 53 }
54 drp->fResult = DiffRecord::kCouldNotCompare_Result; 54 drp->fResult = DiffRecord::kCouldNotCompare_Result;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 return num_failing_results; 370 return num_failing_results;
371 } 371 }
372 372
373 #if !defined SK_BUILD_FOR_IOS 373 #if !defined SK_BUILD_FOR_IOS
374 int main(int argc, char * const argv[]) { 374 int main(int argc, char * const argv[]) {
375 return tool_main(argc, (char**) argv); 375 return tool_main(argc, (char**) argv);
376 } 376 }
377 #endif 377 #endif
OLDNEW
« no previous file with comments | « tools/render_pictures_main.cpp ('k') | tools/skdiff_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698