OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkPerlinNoiseShader.h" | 9 #include "SkPerlinNoiseShader.h" |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 test(canvas, 0, 200, SkPerlinNoiseShader::kTurbulence_Type, | 65 test(canvas, 0, 200, SkPerlinNoiseShader::kTurbulence_Type, |
66 0.1f, 0.1f, 2, 0, true); | 66 0.1f, 0.1f, 2, 0, true); |
67 test(canvas, 100, 200, SkPerlinNoiseShader::kTurbulence_Type, | 67 test(canvas, 100, 200, SkPerlinNoiseShader::kTurbulence_Type, |
68 0.2f, 0.4f, 5, 0, false); | 68 0.2f, 0.4f, 5, 0, false); |
69 | 69 |
70 test(canvas, 0, 300, SkPerlinNoiseShader::kFractalNoise_Type, | 70 test(canvas, 0, 300, SkPerlinNoiseShader::kFractalNoise_Type, |
71 0.1f, 0.1f, 3, 1, false); | 71 0.1f, 0.1f, 3, 1, false); |
72 test(canvas, 100, 300, SkPerlinNoiseShader::kFractalNoise_Type, | 72 test(canvas, 100, 300, SkPerlinNoiseShader::kFractalNoise_Type, |
73 0.1f, 0.1f, 3, 4, false); | 73 0.1f, 0.1f, 3, 4, false); |
74 | 74 |
75 canvas->scale(SkFloatToScalar(0.75f), SkFloatToScalar(1.0f)); | 75 canvas->scale(0.75f, 1.0f); |
76 | 76 |
77 test(canvas, 0, 400, SkPerlinNoiseShader::kFractalNoise_Type, | 77 test(canvas, 0, 400, SkPerlinNoiseShader::kFractalNoise_Type, |
78 0.1f, 0.1f, 2, 0, false); | 78 0.1f, 0.1f, 2, 0, false); |
79 test(canvas, 100, 400, SkPerlinNoiseShader::kFractalNoise_Type, | 79 test(canvas, 100, 400, SkPerlinNoiseShader::kFractalNoise_Type, |
80 0.2f, 0.4f, 5, 0, true); | 80 0.2f, 0.4f, 5, 0, true); |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 typedef GM INHERITED; | 84 typedef GM INHERITED; |
85 SkISize fSize; | 85 SkISize fSize; |
86 }; | 86 }; |
87 | 87 |
88 ////////////////////////////////////////////////////////////////////////////// | 88 ////////////////////////////////////////////////////////////////////////////// |
89 | 89 |
90 static GM* MyFactory(void*) { return new PerlinNoiseGM; } | 90 static GM* MyFactory(void*) { return new PerlinNoiseGM; } |
91 static GMRegistry reg(MyFactory); | 91 static GMRegistry reg(MyFactory); |
92 | 92 |
93 } | 93 } |
OLD | NEW |