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

Side by Side Diff: gm/perlinnoise.cpp

Issue 207543008: SkPerlinNoiseShader::CreateTubulenceNoise() is misspelled (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added alias to CreateTubulence Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « bench/PerlinNoiseBench.cpp ('k') | include/effects/SkPerlinNoiseShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 canvas->drawRect(r, paint); 36 canvas->drawRect(r, paint);
37 canvas->restore(); 37 canvas->restore();
38 } 38 }
39 39
40 void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type, 40 void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type,
41 float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, 41 float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed,
42 bool stitchTiles) { 42 bool stitchTiles) {
43 SkShader* shader = (type == SkPerlinNoiseShader::kFractalNoise_Type) ? 43 SkShader* shader = (type == SkPerlinNoiseShader::kFractalNoise_Type) ?
44 SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequenc yY, numOctaves, 44 SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequenc yY, numOctaves,
45 seed, stitchTiles ? &fSize : NULL) : 45 seed, stitchTiles ? &fSize : NULL) :
46 SkPerlinNoiseShader::CreateTubulence(baseFrequencyX, baseFrequencyY, numOctaves, 46 SkPerlinNoiseShader::CreateTurbulence(baseFrequencyX, baseFrequencyY , numOctaves,
47 seed, stitchTiles ? &fSize : NUL L); 47 seed, stitchTiles ? &fSize : NUL L);
48 SkPaint paint; 48 SkPaint paint;
49 paint.setShader(shader)->unref(); 49 paint.setShader(shader)->unref();
50 drawClippedRect(canvas, x, y, paint); 50 drawClippedRect(canvas, x, y, paint);
51 } 51 }
52 52
53 virtual void onDraw(SkCanvas* canvas) { 53 virtual void onDraw(SkCanvas* canvas) {
54 canvas->clear(0x00000000); 54 canvas->clear(0x00000000);
55 test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type, 55 test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
56 0.1f, 0.1f, 0, 0, false); 56 0.1f, 0.1f, 0, 0, false);
(...skipping 27 matching lines...) Expand all
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 }
OLDNEW
« no previous file with comments | « bench/PerlinNoiseBench.cpp ('k') | include/effects/SkPerlinNoiseShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698