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

Side by Side Diff: include/effects/SkPerlinNoiseShader.h

Issue 14190016: Adding missing SK_API identifier to class so that it's accessible in debug blink. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #ifndef SkPerlinNoiseShader_DEFINED 8 #ifndef SkPerlinNoiseShader_DEFINED
9 #define SkPerlinNoiseShader_DEFINED 9 #define SkPerlinNoiseShader_DEFINED
10 10
11 #include "SkShader.h" 11 #include "SkShader.h"
12 12
13 /** \class SkPerlinNoiseShader 13 /** \class SkPerlinNoiseShader
14 14
15 SkPerlinNoiseShader creates an image using the Perlin turbulence function. 15 SkPerlinNoiseShader creates an image using the Perlin turbulence function.
16 16
17 It can produce tileable noise if asked to stitch tiles and provided a tile s ize. 17 It can produce tileable noise if asked to stitch tiles and provided a tile s ize.
18 In order to fill a large area with repeating noise, set the stitchTiles flag to 18 In order to fill a large area with repeating noise, set the stitchTiles flag to
19 true, and render exactly a single tile of noise. Without this flag, the resu lt 19 true, and render exactly a single tile of noise. Without this flag, the resu lt
20 will contain visible seams between tiles. 20 will contain visible seams between tiles.
21 21
22 The algorithm used is described here : 22 The algorithm used is described here :
23 http://www.w3.org/TR/SVG/filters.html#feTurbulenceElement 23 http://www.w3.org/TR/SVG/filters.html#feTurbulenceElement
24 */ 24 */
25 class SkPerlinNoiseShader : public SkShader { 25 class SK_API SkPerlinNoiseShader : public SkShader {
26 struct PaintingData; 26 struct PaintingData;
27 public: 27 public:
28 struct StitchData; 28 struct StitchData;
29 29
30 /** 30 /**
31 * About the noise types : the difference between the 2 is just minor tweak s to the algorithm, 31 * About the noise types : the difference between the 2 is just minor tweak s to the algorithm,
32 * they're not 2 entirely different noises. The output looks different, but once the noise is 32 * they're not 2 entirely different noises. The output looks different, but once the noise is
33 * generated in the [1, -1] range, the output is brought back in the [0, 1] range by doing : 33 * generated in the [1, -1] range, the output is brought back in the [0, 1] range by doing :
34 * kFractalNoise_Type : noise * 0.5 + 0.5 34 * kFractalNoise_Type : noise * 0.5 + 0.5
35 * kTurbulence_Type : abs(noise) 35 * kTurbulence_Type : abs(noise)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 SkISize fTileSize; 102 SkISize fTileSize;
103 bool fStitchTiles; 103 bool fStitchTiles;
104 SkMatrix fMatrix; 104 SkMatrix fMatrix;
105 105
106 PaintingData* fPaintingData; 106 PaintingData* fPaintingData;
107 107
108 typedef SkShader INHERITED; 108 typedef SkShader INHERITED;
109 }; 109 };
110 110
111 #endif 111 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698