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

Unified Diff: gm/lightingshader.cpp

Issue 2026763002: Make use of new SkLights class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix SampleApp slide Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lightingshader.cpp
diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp
index 54f698a75323cbf2abbd2fb989d15ef97f1f90fb..ae6a24f9f0c3ce895aeae048f022c53ce0504daf 100644
--- a/gm/lightingshader.cpp
+++ b/gm/lightingshader.cpp
@@ -46,13 +46,13 @@ public:
LightingShaderGM() {
this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC));
- SkLightingShader::Lights::Builder builder;
+ SkLights::Builder builder;
- builder.add(SkLight(SkColor3f::Make(1.0f, 1.0f, 1.0f),
- SkVector3::Make(1.0f, 0.0f, 0.0f)));
- builder.add(SkLight(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
+ builder.add(SkLights::Light(SkColor3f::Make(1.0f, 1.0f, 1.0f),
+ SkVector3::Make(1.0f, 0.0f, 0.0f)));
+ builder.add(SkLights::Light(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
- fLights.reset(builder.finish());
+ fLights = builder.finish();
}
protected:
@@ -162,10 +162,10 @@ private:
static const int kTexSize = 128;
static const int kGMSize = 512;
- SkBitmap fDiffuse;
- SkBitmap fNormalMaps[kNormalMapCount];
+ SkBitmap fDiffuse;
+ SkBitmap fNormalMaps[kNormalMapCount];
- SkAutoTUnref<const SkLightingShader::Lights> fLights;
+ sk_sp<SkLights> fLights;
typedef GM INHERITED;
};
« no previous file with comments | « no previous file | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698