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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: made req changes; needs to move blurimagefilter into core Created 4 years, 4 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
« src/utils/SkShadowPaintFilterCanvas.h ('K') | « tools/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 362325085c4c628aa5f41b4ca7e0a3d56f399ca6..8b89fd4dfe7b3624e985735a1f781e06a34e53f4 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -2389,7 +2389,8 @@ void SkEndDrawPictureCommand::execute(SkCanvas* canvas) const {
SkBeginDrawShadowedPictureCommand::SkBeginDrawShadowedPictureCommand(const SkPicture* picture,
const SkMatrix* matrix,
- const SkPaint* paint)
+ const SkPaint* paint,
+ const SkShadowParams& params)
: INHERITED(kBeginDrawShadowedPicture_OpType)
, fPicture(SkRef(picture)) {
@@ -2408,6 +2409,14 @@ SkBeginDrawShadowedPictureCommand::SkBeginDrawShadowedPictureCommand(const SkPic
fPaint.set(*paint);
fInfo.push(SkObjectParser::PaintToString(*paint));
}
+
robertphillips 2016/08/16 19:36:09 put this copy in the ctor list ?
vjiaoblack 2016/08/17 12:58:56 Done.
+ fShadowParams = params;
robertphillips 2016/08/16 19:36:09 don't make shStr and just appendf to str ?
vjiaoblack 2016/08/17 12:58:56 Done.
+ SkString* shStr = new SkString;
+ shStr->appendf("SkShadowParams: bias:%f, minVariance:%f, shRadius:%f, shType:%d\n",
+ params.fBiasingConstant,
+ params.fMinVariance,
+ params.fShadowRadius,
+ params.fType);
}
void SkBeginDrawShadowedPictureCommand::execute(SkCanvas* canvas) const {
@@ -2432,9 +2441,7 @@ bool SkBeginDrawShadowedPictureCommand::render(SkCanvas* canvas) const {
canvas->save();
xlate_and_scale_to_bounds(canvas, fPicture->cullRect());
robertphillips 2016/08/16 19:36:09 don't we have fMatrix and fPaint ?
vjiaoblack 2016/08/17 12:58:56 Done.
-
- canvas->drawPicture(fPicture.get());
-
+ canvas->drawShadowedPicture(fPicture.get(), nullptr, nullptr, fShadowParams);
canvas->restore();
return true;
« src/utils/SkShadowPaintFilterCanvas.h ('K') | « tools/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698