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

Unified Diff: gm/imagefiltersclipped.cpp

Issue 184973007: Fix CTM scaling and clipping of SkRectShaderImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Leanr ot ytpe Created 6 years, 10 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 | « expectations/gm/ignored-tests.txt ('k') | gm/imagefiltersscaled.cpp » ('j') | no next file with comments »
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 757cd1bf27df4bfafd9cfc87857b6a5e72d1cb38..bb6cd0471f72600cc67bf563a909366ca89b83fc 100644
--- a/gm/imagefiltersclipped.cpp
+++ b/gm/imagefiltersclipped.cpp
@@ -14,6 +14,8 @@
#include "SkGradientShader.h"
#include "SkMorphologyImageFilter.h"
#include "SkOffsetImageFilter.h"
+#include "SkPerlinNoiseShader.h"
+#include "SkRectShaderImageFilter.h"
#include "SkResizeImageFilter.h"
#include "SkScalar.h"
@@ -87,6 +89,8 @@ protected:
SkAutoTUnref<SkImageFilter> gradient(new SkBitmapSource(fGradientCircle));
SkAutoTUnref<SkImageFilter> checkerboard(new SkBitmapSource(fCheckerboard));
+ SkAutoTUnref<SkShader> noise(SkPerlinNoiseShader::CreateFractalNoise(
+ SkDoubleToScalar(0.1), SkDoubleToScalar(0.05), 1, 0));
SkImageFilter* filters[] = {
new SkBlurImageFilter(SkIntToScalar(12), SkIntToScalar(12)),
@@ -101,6 +105,7 @@ protected:
new SkErodeImageFilter(2, 2, checkerboard.get()),
new SkOffsetImageFilter(SkIntToScalar(-16), SkIntToScalar(32)),
new SkResizeImageFilter(RESIZE_FACTOR_X, RESIZE_FACTOR_Y, SkPaint::kNone_FilterLevel),
+ SkRectShaderImageFilter::Create(noise),
};
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | gm/imagefiltersscaled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698