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

Side by Side Diff: tools/skpdiff/SkDiffContext.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/skpdiff/SkCLImageDiffer.cpp ('k') | tools/skpdiff/SkDifferentPixelsMetric_opencl.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 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
11 #include "SkRunnable.h" 11 #include "SkRunnable.h"
12 #include "SkSize.h" 12 #include "SkSize.h"
13 #include "SkStream.h" 13 #include "SkStream.h"
14 #include "SkTDict.h" 14 #include "SkTDict.h"
15 #include "SkTaskGroup.h" 15 #include "SkTaskGroup.h"
16 16
17 // from the tools directory for replace_char(...) 17 // from the tools directory for replace_char(...)
18 #include "picture_utils.h" 18 #include "picture_utils.h"
19 19
20 #include "SkDiffContext.h" 20 #include "SkDiffContext.h"
21 #include "SkImageDiffer.h" 21 #include "SkImageDiffer.h"
22 #include "skpdiff_util.h" 22 #include "skpdiff_util.h"
23 23
24 SkDiffContext::SkDiffContext() { 24 SkDiffContext::SkDiffContext() {
25 fDiffers = NULL; 25 fDiffers = nullptr;
26 fDifferCount = 0; 26 fDifferCount = 0;
27 } 27 }
28 28
29 SkDiffContext::~SkDiffContext() { 29 SkDiffContext::~SkDiffContext() {
30 if (fDiffers) { 30 if (fDiffers) {
31 delete[] fDiffers; 31 delete[] fDiffers;
32 } 32 }
33 } 33 }
34 34
35 void SkDiffContext::setAlphaMaskDir(const SkString& path) { 35 void SkDiffContext::setAlphaMaskDir(const SkString& path) {
(...skipping 15 matching lines...) Expand all
51 } 51 }
52 52
53 void SkDiffContext::setLongNames(const bool useLongNames) { 53 void SkDiffContext::setLongNames(const bool useLongNames) {
54 longNames = useLongNames; 54 longNames = useLongNames;
55 } 55 }
56 56
57 void SkDiffContext::setDiffers(const SkTDArray<SkImageDiffer*>& differs) { 57 void SkDiffContext::setDiffers(const SkTDArray<SkImageDiffer*>& differs) {
58 // Delete whatever the last array of differs was 58 // Delete whatever the last array of differs was
59 if (fDiffers) { 59 if (fDiffers) {
60 delete[] fDiffers; 60 delete[] fDiffers;
61 fDiffers = NULL; 61 fDiffers = nullptr;
62 fDifferCount = 0; 62 fDifferCount = 0;
63 } 63 }
64 64
65 // Copy over the new differs 65 // Copy over the new differs
66 fDifferCount = differs.count(); 66 fDifferCount = differs.count();
67 fDiffers = new SkImageDiffer* [fDifferCount]; 67 fDiffers = new SkImageDiffer* [fDifferCount];
68 differs.copy(fDiffers); 68 differs.copy(fDiffers);
69 } 69 }
70 70
71 static SkString get_common_prefix(const SkString& a, const SkString& b) { 71 static SkString get_common_prefix(const SkString& a, const SkString& b) {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 for (int i = 0; i < cntColumns; i++) { 420 for (int i = 0; i < cntColumns; i++) {
421 SkString str; 421 SkString str;
422 str.printf(", %f", values[i]); 422 str.printf(", %f", values[i]);
423 stream.writeText(str.c_str()); 423 stream.writeText(str.c_str());
424 } 424 }
425 stream.writeText("\n"); 425 stream.writeText("\n");
426 426
427 currentRecord = iter2.next(); 427 currentRecord = iter2.next();
428 } 428 }
429 } 429 }
OLDNEW
« no previous file with comments | « tools/skpdiff/SkCLImageDiffer.cpp ('k') | tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698