Chromium Code Reviews| Index: tools/debugger/SkDebugCanvas.cpp |
| diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp |
| index ae934a16e74267759090f83082df9921371b1bf0..3422726191ea6de3d3f94124a178de7d5551058b 100644 |
| --- a/tools/debugger/SkDebugCanvas.cpp |
| +++ b/tools/debugger/SkDebugCanvas.cpp |
| @@ -58,6 +58,20 @@ protected: |
| this->SkCanvas::onDrawPicture(picture, matrix, paint); |
| } |
| + void onDrawShadowedPicture(const SkPicture* picture, |
| + const SkMatrix* matrix, |
| + const SkPaint* paint) |
| +#ifdef SK_USE_SHADOWS |
| + override |
|
jvanverth1
2016/07/21 13:56:53
You don't need override in the definition.
vjiaoblack
2016/07/21 15:11:20
Done.
|
| +#endif |
| + { |
| +#ifdef SK_USE_SHADOWS |
| + this->SkCanvas::onDrawShadowedPicture(picture, matrix, paint); |
| +#else |
| + this->SkCanvas::onDrawPicture(picture, matrix, paint); |
| +#endif |
| + } |
| + |
| private: |
| sk_sp<SkXfermode> fOverdrawXfermode; |
| @@ -603,6 +617,15 @@ void SkDebugCanvas::onDrawPicture(const SkPicture* picture, |
| this->addDrawCommand(new SkEndDrawPictureCommand(SkToBool(matrix) || SkToBool(paint))); |
| } |
| +void SkDebugCanvas::onDrawShadowedPicture(const SkPicture* picture, |
| + const SkMatrix* matrix, |
| + const SkPaint* paint) { |
| + this->addDrawCommand(new SkBeginDrawShadowedPictureCommand(picture, matrix, paint)); |
| + SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect()); |
| + picture->playback(this); |
| + this->addDrawCommand(new SkEndDrawShadowedPictureCommand(SkToBool(matrix) || SkToBool(paint))); |
| +} |
| + |
| void SkDebugCanvas::onDrawPoints(PointMode mode, size_t count, |
| const SkPoint pts[], const SkPaint& paint) { |
| this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint)); |
| @@ -691,8 +714,10 @@ void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { |
| } |
| void SkDebugCanvas::didTranslateZ(SkScalar z) { |
| +#ifdef SK_USE_SHADOWS |
| this->addDrawCommand(new SkTranslateZCommand(z)); |
| this->INHERITED::didTranslateZ(z); |
| +#endif |
| } |
| void SkDebugCanvas::toggleCommand(int index, bool toggle) { |