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

Unified Diff: gm/colormatrix.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 | « gm/colorfilters.cpp ('k') | gm/dropshadowimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colormatrix.cpp
diff --git a/gm/colormatrix.cpp b/gm/colormatrix.cpp
index de80ebb64b3b8cc9ffe43cbffe42ebc3affe1a95..8ac15dba8ea9073072232de6a3d6f940ae23bb0b 100644
--- a/gm/colormatrix.cpp
+++ b/gm/colormatrix.cpp
@@ -14,11 +14,11 @@
#define HEIGHT 500
static void set_color_matrix(SkPaint* paint, const SkColorMatrix& matrix) {
- paint->setColorFilter(SkColorMatrixFilter::Create(matrix))->unref();
+ paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix.fMat));
}
static void set_array(SkPaint* paint, const SkScalar array[]) {
- paint->setColorFilter(SkColorMatrixFilter::Create(array))->unref();
+ paint->setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(array));
}
class ColorMatrixGM : public skiagm::GM {
« no previous file with comments | « gm/colorfilters.cpp ('k') | gm/dropshadowimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698