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

Unified Diff: include/core/SkLights.h

Issue 2146073003: Creating framework for drawShadowedPicture (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Added setLights and getLIghts calls Created 4 years, 5 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
Index: include/core/SkLights.h
diff --git a/include/core/SkLights.h b/include/core/SkLights.h
index c5c54276a39597909ff53a0465a6e97fee5a8743..5d4d926d08abbbb6cd447c4caa092b3f03f8ee0c 100644
--- a/include/core/SkLights.h
+++ b/include/core/SkLights.h
@@ -12,6 +12,7 @@
#include "SkPoint3.h"
#include "SkRefCnt.h"
#include "../private/SkTDArray.h"
+#include "SkImage.h"
class SK_API SkLights : public SkRefCnt {
public:
@@ -44,11 +45,14 @@ public:
return fDirection;
}
+ void setShadowMap(sk_sp<SkImage> shadowMap) { }
+
private:
LightType fType;
SkColor3f fColor; // linear (unpremul) color. Range is 0..1 in each channel.
SkVector3 fDirection; // direction towards the light (+Z is out of the screen).
// If degenerate, it will be replaced with (0, 0, 1).
+
};
class Builder {
@@ -73,7 +77,7 @@ public:
return fLights.count();
}
- const Light& light(int index) const {
+ Light& light(int index) {
jvanverth1 2016/07/15 19:16:30 It might be good to have both a const and a non-co
vjiaoblack 2016/07/18 13:03:23 Done.
return fLights[index];
}

Powered by Google App Engine
This is Rietveld 408576698