Index: gm/lighting.cpp |
diff --git a/gm/lighting.cpp b/gm/lighting.cpp |
index 0bfbb47a95e140a4f436a102d43629b171e3555b..6df58516b2b5f4f7118e3e24513be926ddfa065e 100644 |
--- a/gm/lighting.cpp |
+++ b/gm/lighting.cpp |
@@ -8,6 +8,7 @@ |
#include "gm.h" |
#include "SkLightingImageFilter.h" |
#include "SkOffsetImageFilter.h" |
+#include "SkPoint3.h" |
#define WIDTH 330 |
#define HEIGHT 660 |
@@ -69,14 +70,18 @@ protected: |
canvas->restore(); |
} |
} |
- SkPoint3 pointLocation(0, 0, SkIntToScalar(10)); |
+ SkPoint3 pointLocation = SkPoint3::Make(0, 0, SkIntToScalar(10)); |
SkScalar azimuthRad = SkDegreesToRadians(SkIntToScalar(225)); |
SkScalar elevationRad = SkDegreesToRadians(SkIntToScalar(5)); |
- SkPoint3 distantDirection(SkScalarMul(SkScalarCos(azimuthRad), SkScalarCos(elevationRad)), |
- SkScalarMul(SkScalarSin(azimuthRad), SkScalarCos(elevationRad)), |
- SkScalarSin(elevationRad)); |
- SkPoint3 spotLocation(SkIntToScalar(-10), SkIntToScalar(-10), SkIntToScalar(20)); |
- SkPoint3 spotTarget(SkIntToScalar(40), SkIntToScalar(40), 0); |
+ SkPoint3 distantDirection = SkPoint3::Make(SkScalarMul(SkScalarCos(azimuthRad), |
+ SkScalarCos(elevationRad)), |
+ SkScalarMul(SkScalarSin(azimuthRad), |
+ SkScalarCos(elevationRad)), |
+ SkScalarSin(elevationRad)); |
+ SkPoint3 spotLocation = SkPoint3::Make(SkIntToScalar(-10), |
+ SkIntToScalar(-10), |
+ SkIntToScalar(20)); |
+ SkPoint3 spotTarget = SkPoint3::Make(SkIntToScalar(40), SkIntToScalar(40), 0); |
SkScalar spotExponent = SK_Scalar1; |
SkScalar cutoffAngle = SkIntToScalar(15); |
SkScalar kd = SkIntToScalar(2); |