aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/lightingshader.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-07-31 05:17:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-31 05:17:24 -0700
commita9652ac09ee45b964e0d906887e1521ee328cb6a (patch)
tree9a31a2e0c2167d9ef02a2189104f857fd5207e40 /gm/lightingshader.cpp
parent850bbf1bb62e07b02e16627e522079f60333d857 (diff)
Address some SkLightingShader TODOs
This CL: switches the light colors to be 3 scalars (SkColor3f) adds some dox Review URL: https://codereview.chromium.org/1265983003
Diffstat (limited to 'gm/lightingshader.cpp')
-rw-r--r--gm/lightingshader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp
index ad8823d27d..687968abb6 100644
--- a/gm/lightingshader.cpp
+++ b/gm/lightingshader.cpp
@@ -105,12 +105,12 @@ public:
LightingShaderGM() {
this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC));
- fLight.fColor = SkColorSetRGB(0xff, 0xff, 0xff);
+ fLight.fColor = SkColor3f::Make(1.0f, 1.0f, 1.0f);
fLight.fDirection.fX = 0.0f;
fLight.fDirection.fY = 0.0f;
fLight.fDirection.fZ = 1.0f;
- fAmbient = SkColorSetRGB(0x1f, 0x1f, 0x1f);
+ fAmbient = SkColor3f::Make(0.1f, 0.1f, 0.1f);
}
protected:
@@ -171,7 +171,7 @@ private:
SkBitmap fFrustumNormalMap;
SkLightingShader::Light fLight;
- SkColor fAmbient;
+ SkColor3f fAmbient;
typedef GM INHERITED;
};