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

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 1825073002: Revert[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: remove flag 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 | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorMatrixFilter.cpp
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index e122b6ac8e8aef1bed2171dac4173ac7f484c67b..82bd45b73ddd759bb0d19ec1bc56f9f4518a6bfa 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -16,7 +16,7 @@ static SkScalar byte_to_scale(U8CPU byte) {
}
}
-SkColorFilter* SkColorMatrixFilter::CreateLightingFilter(SkColor mul, SkColor add) {
+sk_sp<SkColorFilter> SkColorMatrixFilter::MakeLightingFilter(SkColor mul, SkColor add) {
SkColorMatrix matrix;
matrix.setScale(byte_to_scale(SkColorGetR(mul)),
byte_to_scale(SkColorGetG(mul)),
@@ -26,5 +26,5 @@ SkColorFilter* SkColorMatrixFilter::CreateLightingFilter(SkColor mul, SkColor ad
SkIntToScalar(SkColorGetG(add)),
SkIntToScalar(SkColorGetB(add)),
0);
- return SkColorMatrixFilter::Create(matrix);
+ return SkColorFilter::MakeMatrixFilterRowMajor255(matrix.fMat);
}
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698