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

Unified Diff: gm/perlinnoise.cpp

Issue 16818013: Enabling Perlin Noise on Android (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Update Created 7 years, 6 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 | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/perlinnoise.cpp
diff --git a/gm/perlinnoise.cpp b/gm/perlinnoise.cpp
index e054c52ff28cb3cf9b270e68ba06f64e91b5070c..a2ec916a39052783a26d579cdfd57a75ccec229f 100644
--- a/gm/perlinnoise.cpp
+++ b/gm/perlinnoise.cpp
@@ -23,7 +23,7 @@ protected:
}
virtual SkISize onISize() {
- return make_isize(500, 400);
+ return make_isize(200, 400);
}
void drawClippedRect(SkCanvas* canvas, int x, int y, const SkPaint& paint) {
@@ -56,48 +56,24 @@ protected:
test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
0.1f, 0.1f, 2, 0, false);
test(canvas, 100, 0, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.4f, 0.2f, 3, 0, true);
- test(canvas, 200, 0, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.3f, 0.6f, 4, 0, false);
- test(canvas, 300, 0, SkPerlinNoiseShader::kFractalNoise_Type,
0.2f, 0.4f, 5, 0, true);
- test(canvas, 400, 0, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.5f, 0.8f, 6, 0, false);
test(canvas, 0, 100, SkPerlinNoiseShader::kTurbulence_Type,
0.1f, 0.1f, 2, 0, true);
test(canvas, 100, 100, SkPerlinNoiseShader::kTurbulence_Type,
- 0.4f, 0.2f, 3, 0, false);
- test(canvas, 200, 100, SkPerlinNoiseShader::kTurbulence_Type,
- 0.3f, 0.6f, 4, 0, true);
- test(canvas, 300, 100, SkPerlinNoiseShader::kTurbulence_Type,
0.2f, 0.4f, 5, 0, false);
- test(canvas, 400, 100, SkPerlinNoiseShader::kTurbulence_Type,
- 0.5f, 0.8f, 6, 0, true);
test(canvas, 0, 200, SkPerlinNoiseShader::kFractalNoise_Type,
0.1f, 0.1f, 3, 1, false);
test(canvas, 100, 200, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.1f, 0.1f, 3, 2, false);
- test(canvas, 200, 200, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.1f, 0.1f, 3, 3, false);
- test(canvas, 300, 200, SkPerlinNoiseShader::kFractalNoise_Type,
0.1f, 0.1f, 3, 4, false);
- test(canvas, 400, 200, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.1f, 0.1f, 3, 5, false);
canvas->scale(SkFloatToScalar(0.75f), SkFloatToScalar(1.0f));
test(canvas, 0, 300, SkPerlinNoiseShader::kFractalNoise_Type,
0.1f, 0.1f, 2, 0, false);
test(canvas, 100, 300, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.4f, 0.2f, 3, 0, true);
- test(canvas, 200, 300, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.3f, 0.6f, 4, 0, false);
- test(canvas, 300, 300, SkPerlinNoiseShader::kFractalNoise_Type,
0.2f, 0.4f, 5, 0, true);
- test(canvas, 400, 300, SkPerlinNoiseShader::kFractalNoise_Type,
- 0.5f, 0.8f, 6, 0, false);
}
private:
« no previous file with comments | « no previous file | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698