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

Unified Diff: src/core/SkBlitter.cpp

Issue 1820303002: Revert of switch colorfilters to sk_sp (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 15562168e990a5bbb5eb5fef9b1f1da4c03b8d8e..04897e3828af4ec077ec27102e88b279437969a8 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -844,8 +844,7 @@
if (SkXfermode::IsMode(mode, SkXfermode::kClear_Mode)) {
SkPaint* p = paint.writable();
shader = p->setShader(nullptr);
- p->setColorFilter(nullptr);
- cf = nullptr;
+ cf = p->setColorFilter(nullptr);
mode = p->setXfermodeMode(SkXfermode::kSrc_Mode);
p->setColor(0);
}
@@ -868,7 +867,7 @@
if (cf) {
SkASSERT(shader);
- paint.writable()->setShader(shader->makeWithColorFilter(sk_ref_sp(cf)));
+ paint.writable()->setShader(shader->makeWithColorFilter(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