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

Side by Side Diff: gm/perlinnoise.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « gm/ovals.cpp ('k') | gm/roundrects.cpp » ('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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « gm/ovals.cpp ('k') | gm/roundrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698