Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 35a8d1c7b92193a4d247a4766efe54a2976ce0a6..971c108b91c425381530dfe783cb6bb91eea1679 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -17,6 +17,7 @@ |
#include "SkRegion.h" |
#include "SkSurfaceProps.h" |
#include "SkXfermode.h" |
+#include "SkLights.h" |
class GrContext; |
class GrDrawContext; |
@@ -1049,6 +1050,16 @@ public: |
this->drawPicture(picture.get(), matrix, paint); |
} |
+ /** |
+ * Draw the picture into this canvas. |
+ * |
+ * However, this time, we will use the passed-in lights to generate shadows! |
jvanverth1
2016/07/14 17:27:09
This is a little too vague. Suggestion: Will use t
vjiaoblack
2016/07/14 20:38:17
Done.
|
+ */ |
+ void drawShadowedPicture(const SkPicture*, sk_sp<SkLights>); |
jvanverth1
2016/07/14 17:27:09
Do we not need a matrix or paint?
vjiaoblack
2016/07/14 20:38:18
I originally thought the proposed function didn't,
|
+ void drawShadowedPicture(const sk_sp<SkPicture>& picture, sk_sp<SkLights> lights) { |
+ this->drawShadowedPicture(picture.get(), lights); |
+ } |
+ |
enum VertexMode { |
kTriangles_VertexMode, |
kTriangleStrip_VertexMode, |
@@ -1402,6 +1413,7 @@ protected: |
virtual void onDiscard(); |
virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*); |
+ virtual void onDrawShadowedPicture(const SkPicture*, sk_sp<SkLights>); |
// Returns the canvas to be used by DrawIter. Default implementation |
// returns this. Subclasses that encapsulate an indirect canvas may |