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

Unified Diff: include/core/SkCanvas.h

Issue 2167223002: Revert of Creating framework for drawShadowedPicture (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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
« no previous file with comments | « gyp/common_variables.gypi ('k') | include/core/SkLights.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 5bff7d86dcbe43152b928e04bc0a770ba8827875..35a8d1c7b92193a4d247a4766efe54a2976ce0a6 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -17,7 +17,6 @@
#include "SkRegion.h"
#include "SkSurfaceProps.h"
#include "SkXfermode.h"
-#include "SkLights.h"
class GrContext;
class GrDrawContext;
@@ -452,23 +451,12 @@
*/
void resetMatrix();
-#ifdef SK_EXPERIMENTAL_SHADOWING
/** Add the specified translation to the current draw depth of the canvas.
@param z The distance to translate in Z.
Negative into screen, positive out of screen.
Without translation, the draw depth defaults to 0.
*/
void translateZ(SkScalar z);
-
- /** Set the current set of lights in the canvas.
- @param lights The lights that we want the canvas to have.
- */
- void setLights(sk_sp<SkLights> lights);
-
- /** Returns the current set of lights the canvas uses
- */
- sk_sp<SkLights> getLights() const;
-#endif
/**
* Modify the current clip with the specified rectangle.
@@ -1061,34 +1049,6 @@
this->drawPicture(picture.get(), matrix, paint);
}
-#ifdef SK_EXPERIMENTAL_SHADOWING
- /**
- * Draw the picture into this canvas.
- *
- * We will use the canvas's lights along with the picture information (draw depths of
- * objects, etc) to first create a set of shadowmaps for the light-picture pairs, and
- * then use that set of shadowmaps to render the scene with shadows.
- *
- * If matrix is non-null, apply that matrix to the CTM when drawing this picture. This is
- * logically equivalent to
- * save/concat/drawPicture/restore
- *
- * If paint is non-null, draw the picture into a temporary buffer, and then apply the paint's
- * alpha/colorfilter/imagefilter/xfermode to that buffer as it is drawn to the canvas.
- * This is logically equivalent to
- * saveLayer(paint)/drawPicture/restore
- *
- */
- void drawShadowedPicture(const SkPicture*,
- const SkMatrix* matrix,
- const SkPaint* paint);
- void drawShadowedPicture(const sk_sp<SkPicture>& picture,
- const SkMatrix* matrix,
- const SkPaint* paint) {
- this->drawShadowedPicture(picture.get(), matrix, paint);
- }
-#endif
-
enum VertexMode {
kTriangles_VertexMode,
kTriangleStrip_VertexMode,
@@ -1307,13 +1267,9 @@
void temporary_internal_describeTopLayer(SkMatrix* matrix, SkIRect* clip_bounds);
protected:
-#ifdef SK_EXPERIMENTAL_SHADOWING
/** Returns the current (cumulative) draw depth of the canvas.
*/
SkScalar getZ() const;
-
- sk_sp<SkLights> fLights;
-#endif
/** After calling saveLayer(), there can be any number of devices that make
up the top-most drawing area. LayerIter can be used to iterate through
@@ -1380,10 +1336,7 @@
virtual void didRestore() {}
virtual void didConcat(const SkMatrix&) {}
virtual void didSetMatrix(const SkMatrix&) {}
-
-#ifdef SK_EXPERIMENTAL_SHADOWING
virtual void didTranslateZ(SkScalar) {}
-#endif
virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value);
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
@@ -1449,12 +1402,6 @@
virtual void onDiscard();
virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*);
-
-#ifdef SK_EXPERIMENTAL_SHADOWING
- virtual void onDrawShadowedPicture(const SkPicture*,
- const SkMatrix*,
- const SkPaint*);
-#endif
// Returns the canvas to be used by DrawIter. Default implementation
// returns this. Subclasses that encapsulate an indirect canvas may
« no previous file with comments | « gyp/common_variables.gypi ('k') | include/core/SkLights.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698