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

Side by Side Diff: src/core/SkLight.h

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkImageInfo.cpp ('k') | src/core/SkLightingShader.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
2 /* 1 /*
3 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #ifndef SkLight_DEFINED 8 #ifndef SkLight_DEFINED
10 #define SkLight_DEFINED 9 #define SkLight_DEFINED
11 10
(...skipping 21 matching lines...) Expand all
33 : fType(kDirectional_LightType) 32 : fType(kDirectional_LightType)
34 , fColor(color) 33 , fColor(color)
35 , fDirection(dir) { 34 , fDirection(dir) {
36 if (!fDirection.normalize()) { 35 if (!fDirection.normalize()) {
37 fDirection.set(0.0f, 0.0f, 1.0f); 36 fDirection.set(0.0f, 0.0f, 1.0f);
38 } 37 }
39 } 38 }
40 39
41 LightType type() const { return fType; } 40 LightType type() const { return fType; }
42 const SkColor3f& color() const { return fColor; } 41 const SkColor3f& color() const { return fColor; }
43 const SkVector3& dir() const { 42 const SkVector3& dir() const {
44 SkASSERT(kAmbient_LightType != fType); 43 SkASSERT(kAmbient_LightType != fType);
45 return fDirection; 44 return fDirection;
46 } 45 }
47 46
48 private: 47 private:
49 LightType fType; 48 LightType fType;
50 SkColor3f fColor; // linear (unpremul) color. Range is 0..1 in e ach channel. 49 SkColor3f fColor; // linear (unpremul) color. Range is 0..1 in e ach channel.
51 SkVector3 fDirection; // direction towards the light (+Z is out of t he screen). 50 SkVector3 fDirection; // direction towards the light (+Z is out of t he screen).
52 // If degenerate, it will be replaced with (0, 0, 1). 51 // If degenerate, it will be replaced with (0, 0, 1).
53 }; 52 };
54 53
55 54
56 #endif 55 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageInfo.cpp ('k') | src/core/SkLightingShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698