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

Unified Diff: gm/imagefiltersscaled.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 | « gm/imagefiltersclipped.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersscaled.cpp
diff --git a/gm/imagefiltersscaled.cpp b/gm/imagefiltersscaled.cpp
index 6ccaece7efe86f31c6d59f9d8fc34d2968301cf8..ab24a3025f170685cbdea17b188ddb80ba511cb2 100644
--- a/gm/imagefiltersscaled.cpp
+++ b/gm/imagefiltersscaled.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"
@@ -33,7 +35,7 @@ protected:
}
virtual SkISize onISize() {
- return make_isize(1020, 500);
+ return make_isize(1140, 500);
}
void make_checkerboard() {
@@ -86,6 +88,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(4), SkIntToScalar(4)),
@@ -100,6 +104,7 @@ protected:
new SkErodeImageFilter(1, 1, checkerboard.get()),
new SkOffsetImageFilter(SkIntToScalar(32), 0),
new SkResizeImageFilter(RESIZE_FACTOR, RESIZE_FACTOR, SkPaint::kNone_FilterLevel),
+ SkRectShaderImageFilter::Create(noise),
};
SkVector scales[] = {
« no previous file with comments | « gm/imagefiltersclipped.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698