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

Unified Diff: src/core/SkBlitter.cpp

Issue 1827433002: Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 04897e3828af4ec077ec27102e88b279437969a8..15562168e990a5bbb5eb5fef9b1f1da4c03b8d8e 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -844,7 +844,8 @@
if (SkXfermode::IsMode(mode, SkXfermode::kClear_Mode)) {
SkPaint* p = paint.writable();
shader = p->setShader(nullptr);
- cf = p->setColorFilter(nullptr);
+ p->setColorFilter(nullptr);
+ cf = nullptr;
mode = p->setXfermodeMode(SkXfermode::kSrc_Mode);
p->setColor(0);
}
@@ -867,7 +868,7 @@
if (cf) {
SkASSERT(shader);
- paint.writable()->setShader(shader->makeWithColorFilter(cf));
+ paint.writable()->setShader(shader->makeWithColorFilter(sk_ref_sp(cf)));
shader = paint->getShader();
// blitters should ignore the presence/absence of a filter, since
// if there is one, the shader will take care of it.
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698