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

Side by Side Diff: src/effects/SkColorMatrixFilter.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 | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDashPathEffect.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkColorMatrixFilter.h" 8 #include "SkColorMatrixFilter.h"
9 #include "SkColorMatrix.h" 9 #include "SkColorMatrix.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 fProc = shiftIs16 ? Add16 : Add; 179 fProc = shiftIs16 ? Add16 : Add;
180 } else { 180 } else {
181 fProc = NULL; // identity 181 fProc = NULL; // identity
182 } 182 }
183 } 183 }
184 184
185 /* preround our add values so we get a rounded shift. We do this after we 185 /* preround our add values so we get a rounded shift. We do this after we
186 analyze the array, so we don't miss the case where the caller has zeros 186 analyze the array, so we don't miss the case where the caller has zeros
187 which could make us accidentally take the General or Add case. 187 which could make us accidentally take the General or Add case.
188 */ 188 */
189 if (NULL != fProc) { 189 if (fProc) {
190 int32_t add = 1 << (fState.fShift - 1); 190 int32_t add = 1 << (fState.fShift - 1);
191 array[4] += add; 191 array[4] += add;
192 array[9] += add; 192 array[9] += add;
193 array[14] += add; 193 array[14] += add;
194 array[19] += add; 194 array[19] += add;
195 } 195 }
196 } 196 }
197 197
198 /////////////////////////////////////////////////////////////////////////////// 198 ///////////////////////////////////////////////////////////////////////////////
199 199
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 str->append("matrix: ("); 502 str->append("matrix: (");
503 for (int i = 0; i < 20; ++i) { 503 for (int i = 0; i < 20; ++i) {
504 str->appendScalar(fMatrix.fMat[i]); 504 str->appendScalar(fMatrix.fMat[i]);
505 if (i < 19) { 505 if (i < 19) {
506 str->append(", "); 506 str->append(", ");
507 } 507 }
508 } 508 }
509 str->append(")"); 509 str->append(")");
510 } 510 }
511 #endif 511 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698