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

Unified Diff: src/core/SkLiteDL.cpp

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Trying different include path 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
« no previous file with comments | « src/core/SkLiteDL.h ('k') | src/core/SkLiteRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLiteDL.cpp
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp
index f7fe578c4efa38fdd0dc7d6019faed1e48e52bfc..d94e1399d66c38e813141247b6daa494856f3af0 100644
--- a/src/core/SkLiteDL.cpp
+++ b/src/core/SkLiteDL.cpp
@@ -270,17 +270,20 @@ namespace {
};
struct DrawShadowedPicture final : Op {
static const auto kType = Type::DrawShadowedPicture;
- DrawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint)
+ DrawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix,
+ const SkPaint* paint, const SkShadowParams& params)
: picture(sk_ref_sp(picture)) {
if (matrix) { this->matrix = *matrix; }
if (paint) { this->paint = *paint; }
+ this->params = params;
}
sk_sp<const SkPicture> picture;
SkMatrix matrix = SkMatrix::I();
SkPaint paint;
+ SkShadowParams params;
void draw(SkCanvas* c, const SkMatrix&) {
#ifdef SK_EXPERIMENTAL_SHADOWING
- c->drawShadowedPicture(picture.get(), &matrix, &paint);
+ c->drawShadowedPicture(picture.get(), &matrix, &paint, params);
#endif
}
void makeThreadsafe() { make_threadsafe(nullptr, &matrix); }
@@ -615,9 +618,9 @@ void SkLiteDL::drawPicture(const SkPicture* picture,
const SkMatrix* matrix, const SkPaint* paint) {
this->push<DrawPicture>(0, picture, matrix, paint);
}
-void SkLiteDL::drawShadowedPicture(const SkPicture* picture,
- const SkMatrix* matrix, const SkPaint* paint) {
- this->push<DrawShadowedPicture>(0, picture, matrix, paint);
+void SkLiteDL::drawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix,
+ const SkPaint* paint, const SkShadowParams& params) {
+ push<DrawShadowedPicture>(0, picture, matrix, paint, params);
}
void SkLiteDL::drawBitmap(const SkBitmap& bm, SkScalar x, SkScalar y, const SkPaint* paint) {
« no previous file with comments | « src/core/SkLiteDL.h ('k') | src/core/SkLiteRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698