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

Side by Side Diff: src/effects/SkArithmeticMode.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 | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkArithmeticMode_gpu.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 "SkArithmeticMode.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[], 100 void SkArithmeticMode_scalar::xfer32(SkPMColor dst[], const SkPMColor src[],
101 int count, const SkAlpha aaCoverage[]) const { 101 int count, const SkAlpha aaCoverage[]) const {
102 SkScalar k1 = fK[0] / 255; 102 SkScalar k1 = fK[0] / 255;
103 SkScalar k2 = fK[1]; 103 SkScalar k2 = fK[1];
104 SkScalar k3 = fK[2]; 104 SkScalar k3 = fK[2];
105 SkScalar k4 = fK[3] * 255; 105 SkScalar k4 = fK[3] * 255;
106 106
107 for (int i = 0; i < count; ++i) { 107 for (int i = 0; i < count; ++i) {
108 if ((NULL == aaCoverage) || aaCoverage[i]) { 108 if ((nullptr == aaCoverage) || aaCoverage[i]) {
109 SkPMColor sc = src[i]; 109 SkPMColor sc = src[i];
110 SkPMColor dc = dst[i]; 110 SkPMColor dc = dst[i];
111 111
112 int a, r, g, b; 112 int a, r, g, b;
113 113
114 if (gUseUnpremul) { 114 if (gUseUnpremul) {
115 int sa = SkGetPackedA32(sc); 115 int sa = SkGetPackedA32(sc);
116 int da = SkGetPackedA32(dc); 116 int da = SkGetPackedA32(dc);
117 117
118 int srcNeedsUnpremul = needsUnpremul(sa); 118 int srcNeedsUnpremul = needsUnpremul(sa);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 fEnforcePMColor); 259 fEnforcePMColor);
260 } 260 }
261 return true; 261 return true;
262 } 262 }
263 263
264 #endif 264 #endif
265 265
266 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 266 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
267 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 267 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
268 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 268 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698