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

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: made req changes 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
Index: src/core/SkLiteDL.cpp
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp
index 8dad6f40e482c04ef4200a6f35a6c7d5bb6e714b..51d168bfc389cd8a5a1019c74a2a0f1e4ccfd923 100644
--- a/src/core/SkLiteDL.cpp
+++ b/src/core/SkLiteDL.cpp
@@ -222,17 +222,20 @@ namespace {
void makeThreadsafe() override { make_threadsafe(nullptr, &matrix); }
};
struct DrawShadowedPicture final : Op {
- DrawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint)
+ DrawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix,
+ const SkPaint* paint, SkShadowType sType)
: picture(sk_ref_sp(picture)) {
if (matrix) { this->matrix = *matrix; }
if (paint) { this->paint = *paint; }
+ this->sType = sType;
}
sk_sp<const SkPicture> picture;
SkMatrix matrix = SkMatrix::I();
SkPaint paint;
+ SkShadowType sType;
void draw(SkCanvas* c) override {
#ifdef SK_EXPERIMENTAL_SHADOWING
- c->drawShadowedPicture(picture.get(), &matrix, &paint);
+ c->drawShadowedPicture(picture.get(), &matrix, &paint, sType);
#endif
}
void optimizeFor(GrContext* ctx) override { optimize_for(ctx, &paint); }
@@ -541,9 +544,9 @@ void SkLiteDL::drawPicture(const SkPicture* picture,
const SkMatrix* matrix, const SkPaint* paint) {
push<DrawPicture>(&fBytes, 0, picture, matrix, paint);
}
-void SkLiteDL::drawShadowedPicture(const SkPicture* picture,
- const SkMatrix* matrix, const SkPaint* paint) {
- push<DrawShadowedPicture>(&fBytes, 0, picture, matrix, paint);
+void SkLiteDL::drawShadowedPicture(const SkPicture* picture, const SkMatrix* matrix,
+ const SkPaint* paint, SkShadowType sType) {
+ push<DrawShadowedPicture>(&fBytes, 0, picture, matrix, paint, sType);
}
void SkLiteDL::drawBitmap(const SkBitmap& bm, SkScalar x, SkScalar y, const SkPaint* paint) {

Powered by Google App Engine
This is Rietveld 408576698