Index: src/core/SkLightingShader.h |
diff --git a/src/core/SkLightingShader.h b/src/core/SkLightingShader.h |
index f25b30342a70699506cc03a5ffbc786e1e620207..7f66aa9ee74e3f7eecc4ebc1f7f2265e25cf1b99 100644 |
--- a/src/core/SkLightingShader.h |
+++ b/src/core/SkLightingShader.h |
@@ -16,6 +16,34 @@ class SkMatrix; |
class SK_API SkLightingShader { |
public: |
+ // TODO does this need to be tagged with SK_API? |
+ class NormalSource : public SkFlattenable { |
egdaniel
2016/06/10 14:23:28
For SK_API, it is believed that having it on the o
dvonbeck
2016/06/10 15:22:29
The problem with the approach you suggested is tha
dvonbeck
2016/06/10 18:31:21
Done.
|
+ |
egdaniel
2016/06/10 14:23:28
remove \n between class and public
dvonbeck
2016/06/10 15:22:29
Done.
|
+ public: |
+ |
+ virtual ~NormalSource(); |
+ |
+ virtual sk_sp<GrFragmentProcessor> asFragmentProcessor( |
+ GrContext* context, |
+ const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, |
+ SkFilterQuality filterQuality, |
+ SkSourceGammaTreatment gammaTreatment) const = 0; |
+ |
+ |
+ // SK_TO_STRING_VIRT() // TODO do I need this one? just copied from SkShader |
+ SK_DEFINE_FLATTENABLE_TYPE(NormalSource) |
egdaniel
2016/06/10 14:23:28
These macros just declare/define various flattenab
dvonbeck
2016/06/10 15:22:29
Acknowledged.
|
+ }; |
+ |
+ class NormalMapSource { |
+ public: |
+ static sk_sp<NormalSource> Make(const SkBitmap& normal, const SkVector& invNormRotation, |
+ const SkMatrix* normLocalM); |
+ |
+ // TODO Why? Shouldn't the impls be registered? |
+ SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
+ }; |
+ |
/** Returns a shader that lights the diffuse and normal maps with a set of lights. |
It returns a shader with a reference count of 1. |