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

Side by Side Diff: src/core/SkNormalSource.cpp

Issue 2185063002: require semi at the end of SkASSERT and friends (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refactor do while as macro Created 4 years, 4 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/core/SkLinearBitmapPipeline_sample.h ('k') | src/gpu/GrPathRenderer.h » ('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 2016 Google Inc. 2 * Copyright 2016 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 "SkError.h" 8 #include "SkError.h"
9 #include "SkErrorInternals.h" 9 #include "SkErrorInternals.h"
10 #include "SkLightingShader.h" 10 #include "SkLightingShader.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 SkScalar invScalingFactor = SkScalarInvert(SkScalarSqrt(scalingF actorSquared)); 273 SkScalar invScalingFactor = SkScalarInvert(SkScalarSqrt(scalingF actorSquared));
274 274
275 output[i].fX = transformed.fX * invScalingFactor; 275 output[i].fX = transformed.fX * invScalingFactor;
276 output[i].fY = transformed.fY * invScalingFactor; 276 output[i].fY = transformed.fY * invScalingFactor;
277 output[i].fZ = tempNorm.fZ; 277 output[i].fZ = tempNorm.fZ;
278 } else { 278 } else {
279 output[i] = {0.0f, 0.0f, tempNorm.fZ}; 279 output[i] = {0.0f, 0.0f, tempNorm.fZ};
280 output[i].normalize(); 280 output[i].normalize();
281 } 281 }
282 282
283 SkASSERT(SkScalarNearlyEqual(output[i].length(), 1.0f)) 283 SkASSERT(SkScalarNearlyEqual(output[i].length(), 1.0f));
284 } 284 }
285 285
286 output += n; 286 output += n;
287 x += n; 287 x += n;
288 count -= n; 288 count -= n;
289 } while (count > 0); 289 } while (count > 0);
290 } 290 }
291 291
292 //////////////////////////////////////////////////////////////////////////////// 292 ////////////////////////////////////////////////////////////////////////////////
293 293
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 //////////////////////////////////////////////////////////////////////////// 453 ////////////////////////////////////////////////////////////////////////////
454 454
455 //////////////////////////////////////////////////////////////////////////// 455 ////////////////////////////////////////////////////////////////////////////
456 456
457 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkNormalSource) 457 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkNormalSource)
458 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(NormalMapSourceImpl) 458 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(NormalMapSourceImpl)
459 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(NormalFlatSourceImpl) 459 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(NormalFlatSourceImpl)
460 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 460 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
461 461
462 //////////////////////////////////////////////////////////////////////////// 462 ////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/core/SkLinearBitmapPipeline_sample.h ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698