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

Side by Side Diff: bench/ChartBench.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 | « no previous file | bench/ETCBitmapBench.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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 fill->lineTo(x, topData[i + leftShift]); 57 fill->lineTo(x, topData[i + leftShift]);
58 x += xDelta; 58 x += xDelta;
59 } 59 }
60 60
61 for (int i = 0; i < leftShift; ++i) { 61 for (int i = 0; i < leftShift; ++i) {
62 plot->lineTo(x, topData[i]); 62 plot->lineTo(x, topData[i]);
63 fill->lineTo(x, topData[i]); 63 fill->lineTo(x, topData[i]);
64 x += xDelta; 64 x += xDelta;
65 } 65 }
66 66
67 if (NULL != bottomData) { 67 if (bottomData) {
68 SkASSERT(bottomData->count() == topData.count()); 68 SkASSERT(bottomData->count() == topData.count());
69 // iterate backwards over the previous graph's data to generate the bott om of the filled 69 // iterate backwards over the previous graph's data to generate the bott om of the filled
70 // area (and account for leftShift). 70 // area (and account for leftShift).
71 for (int i = 0; i < leftShift; ++i) { 71 for (int i = 0; i < leftShift; ++i) {
72 x -= xDelta; 72 x -= xDelta;
73 fill->lineTo(x, (*bottomData)[leftShift - 1 - i]); 73 fill->lineTo(x, (*bottomData)[leftShift - 1 - i]);
74 } 74 }
75 for (int i = 0; i < shiftToEndCount; ++i) { 75 for (int i = 0; i < shiftToEndCount; ++i) {
76 x -= xDelta; 76 x -= xDelta;
77 fill->lineTo(x, (*bottomData)[bottomData->count() - 1 - i]); 77 fill->lineTo(x, (*bottomData)[bottomData->count() - 1 - i]);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 SkTDArray<SkScalar> fData[kNumGraphs]; 183 SkTDArray<SkScalar> fData[kNumGraphs];
184 bool fAA; 184 bool fAA;
185 185
186 typedef Benchmark INHERITED; 186 typedef Benchmark INHERITED;
187 }; 187 };
188 188
189 ////////////////////////////////////////////////////////////////////////////// 189 //////////////////////////////////////////////////////////////////////////////
190 190
191 DEF_BENCH( return new ChartBench(true); ) 191 DEF_BENCH( return new ChartBench(true); )
192 DEF_BENCH( return new ChartBench(false); ) 192 DEF_BENCH( return new ChartBench(false); )
OLDNEW
« no previous file with comments | « no previous file | bench/ETCBitmapBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698