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

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: rebased off master again! 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/core/SkShadowShader.cpp ('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 65de258ed2cbc9cbd5f9e4238510f90b2554332d..1fd6eda6857d58cd490f202302e8a41969e2ee9b 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -2449,14 +2449,20 @@ 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)) {
SkString* str = new SkString;
- str->appendf("SkPicture: L: %f T: %f R: %f B: %f",
+ str->appendf("SkPicture: L: %f T: %f R: %f B: %f\n",
picture->cullRect().fLeft, picture->cullRect().fTop,
picture->cullRect().fRight, picture->cullRect().fBottom);
+ str->appendf("SkShadowParams: bias:%f, minVariance:%f, shRadius:%f, shType:%d\n",
+ params.fBiasingConstant,
+ params.fMinVariance,
+ params.fShadowRadius,
robertphillips 2016/08/23 17:19:40 params.fType == X ? "X" : "Y" - make it human read
vjiaoblack 2016/08/23 18:01:22 Done.
+ params.fType);
fInfo.push(str);
if (matrix) {
@@ -2468,6 +2474,7 @@ SkBeginDrawShadowedPictureCommand::SkBeginDrawShadowedPictureCommand(const SkPic
fPaint.set(*paint);
fInfo.push(SkObjectParser::PaintToString(*paint));
}
robertphillips 2016/08/23 17:19:40 put this in the ctor list
vjiaoblack 2016/08/23 18:01:22 Done.
+ fShadowParams = params;
}
void SkBeginDrawShadowedPictureCommand::execute(SkCanvas* canvas) const {
@@ -2492,9 +2499,7 @@ bool SkBeginDrawShadowedPictureCommand::render(SkCanvas* canvas) const {
canvas->save();
xlate_and_scale_to_bounds(canvas, fPicture->cullRect());
-
- canvas->drawPicture(fPicture.get());
-
+ canvas->drawShadowedPicture(fPicture.get(), fMatrix.get(), fPaint.get(), fShadowParams);
canvas->restore();
return true;
« src/core/SkShadowShader.cpp ('K') | « tools/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698