Index: gm/lighting.cpp |
diff --git a/gm/lighting.cpp b/gm/lighting.cpp |
index 0ce9599bc12c01b01b3d4815b6e21354b956eba4..af102d7d03950f712c0a285b9303f7f3dc381ded 100644 |
--- a/gm/lighting.cpp |
+++ b/gm/lighting.cpp |
@@ -10,7 +10,7 @@ |
#include "SkOffsetImageFilter.h" |
#include "SkPoint3.h" |
-#define WIDTH 550 |
+#define WIDTH 330 |
#define HEIGHT 660 |
namespace skiagm { |
@@ -69,10 +69,8 @@ |
SkIntToScalar(-10), |
SkIntToScalar(20)); |
SkPoint3 spotTarget = SkPoint3::Make(SkIntToScalar(40), SkIntToScalar(40), 0); |
- SkScalar spotExponent1 = SK_Scalar1; |
- SkScalar spotExponent0 = SkIntToScalar(0); |
- SkScalar cutoffAngleSmall = SkIntToScalar(15); |
- SkScalar cutoffAngleNone = SkIntToScalar(180); |
+ SkScalar spotExponent = SK_Scalar1; |
+ SkScalar cutoffAngle = SkIntToScalar(15); |
SkScalar kd = SkIntToScalar(2); |
SkScalar ks = SkIntToScalar(1); |
SkScalar shininess = SkIntToScalar(8); |
@@ -106,36 +104,14 @@ |
paint.setImageFilter(SkLightingImageFilter::CreateSpotLitDiffuse(spotLocation, |
spotTarget, |
- spotExponent1, |
- cutoffAngleSmall, |
+ spotExponent, |
+ cutoffAngle, |
white, |
surfaceScale, |
kd, |
input, |
cr))->unref(); |
drawClippedBitmap(canvas, paint, 220, y); |
- |
- paint.setImageFilter(SkLightingImageFilter::CreateSpotLitDiffuse(spotLocation, |
- spotTarget, |
- spotExponent1, |
- cutoffAngleNone, |
- white, |
- surfaceScale, |
- kd, |
- input, |
- cr))->unref(); |
- drawClippedBitmap(canvas, paint, 330, y); |
- |
- paint.setImageFilter(SkLightingImageFilter::CreateSpotLitDiffuse(spotLocation, |
- spotTarget, |
- spotExponent0, |
- cutoffAngleNone, |
- white, |
- surfaceScale, |
- kd, |
- input, |
- cr))->unref(); |
- drawClippedBitmap(canvas, paint, 440, y); |
y += 110; |
@@ -159,8 +135,8 @@ |
paint.setImageFilter(SkLightingImageFilter::CreateSpotLitSpecular(spotLocation, |
spotTarget, |
- spotExponent1, |
- cutoffAngleSmall, |
+ spotExponent, |
+ cutoffAngle, |
white, |
surfaceScale, |
ks, |
@@ -168,30 +144,6 @@ |
input, |
cr))->unref(); |
drawClippedBitmap(canvas, paint, 220, y); |
- |
- paint.setImageFilter(SkLightingImageFilter::CreateSpotLitSpecular(spotLocation, |
- spotTarget, |
- spotExponent1, |
- cutoffAngleNone, |
- white, |
- surfaceScale, |
- ks, |
- shininess, |
- input, |
- cr))->unref(); |
- drawClippedBitmap(canvas, paint, 330, y); |
- |
- paint.setImageFilter(SkLightingImageFilter::CreateSpotLitSpecular(spotLocation, |
- spotTarget, |
- spotExponent0, |
- cutoffAngleNone, |
- white, |
- surfaceScale, |
- ks, |
- shininess, |
- input, |
- cr))->unref(); |
- drawClippedBitmap(canvas, paint, 440, y); |
y += 110; |
} |