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

Unified Diff: gm/imagefiltersclipped.cpp

Issue 1556553002: Implement an SkPaint-based image filter (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: More randomness for paths and for rasterizer's paint Created 4 years, 11 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 | « no previous file | gm/imagefiltersscaled.cpp » ('j') | samplecode/SampleFilterFuzz.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersclipped.cpp
diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp
index a0fedfdeee27f87355b918194f0a66a17ece34ed..f5c9cefbb2866e1cc9a6ef0c95176ca8c07ebfe4 100644
--- a/gm/imagefiltersclipped.cpp
+++ b/gm/imagefiltersclipped.cpp
@@ -16,9 +16,9 @@
#include "SkLightingImageFilter.h"
#include "SkMorphologyImageFilter.h"
#include "SkOffsetImageFilter.h"
+#include "SkPaintImageFilter.h"
#include "SkPerlinNoiseShader.h"
#include "SkPoint3.h"
-#include "SkRectShaderImageFilter.h"
#include "SkScalar.h"
#include "SkSurface.h"
#include "gm.h"
@@ -139,7 +139,9 @@ protected:
SkSafeUnref(filters[i]);
}
- SkAutoTUnref<SkImageFilter> rectFilter(SkRectShaderImageFilter::Create(noise));
+ SkPaint noisePaint;
+ noisePaint.setShader(noise);
+ SkAutoTUnref<SkImageFilter> rectFilter(SkPaintImageFilter::Create(noisePaint));
canvas->translate(SK_ARRAY_COUNT(filters)*(r.width() + margin), 0);
for (int xOffset = 0; xOffset < 80; xOffset += 16) {
bounds.fLeft = SkIntToScalar(xOffset);
« no previous file with comments | « no previous file | gm/imagefiltersscaled.cpp » ('j') | samplecode/SampleFilterFuzz.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698