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

Side by Side Diff: src/effects/SkPerlinNoiseShader.cpp

Issue 302053002: Revert of setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkValidationUtils.h ('k') | src/effects/gradients/SkGradientShader.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 "SkDither.h" 8 #include "SkDither.h"
9 #include "SkPerlinNoiseShader.h" 9 #include "SkPerlinNoiseShader.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 SkScalar baseFrequencyX, SkScalar baseFrequencyY) 85 SkScalar baseFrequencyX, SkScalar baseFrequencyY)
86 : fTileSize(tileSize) 86 : fTileSize(tileSize)
87 , fBaseFrequency(SkPoint::Make(baseFrequencyX, baseFrequencyY)) 87 , fBaseFrequency(SkPoint::Make(baseFrequencyX, baseFrequencyY))
88 { 88 {
89 this->init(seed); 89 this->init(seed);
90 if (!fTileSize.isEmpty()) { 90 if (!fTileSize.isEmpty()) {
91 this->stitch(); 91 this->stitch();
92 } 92 }
93 93
94 #if SK_SUPPORT_GPU && !defined(SK_USE_SIMPLEX_NOISE) 94 #if SK_SUPPORT_GPU && !defined(SK_USE_SIMPLEX_NOISE)
95 fPermutationsBitmap.setInfo(SkImageInfo::MakeA8(kBlockSize, 1)); 95 fPermutationsBitmap.setConfig(SkImageInfo::MakeA8(kBlockSize, 1));
96 fPermutationsBitmap.setPixels(fLatticeSelector); 96 fPermutationsBitmap.setPixels(fLatticeSelector);
97 97
98 fNoiseBitmap.setInfo(SkImageInfo::MakeN32Premul(kBlockSize, 4)); 98 fNoiseBitmap.setConfig(SkImageInfo::MakeN32Premul(kBlockSize, 4));
99 fNoiseBitmap.setPixels(fNoise[0][0]); 99 fNoiseBitmap.setPixels(fNoise[0][0]);
100 #endif 100 #endif
101 } 101 }
102 102
103 int fSeed; 103 int fSeed;
104 uint8_t fLatticeSelector[kBlockSize]; 104 uint8_t fLatticeSelector[kBlockSize];
105 uint16_t fNoise[4][kBlockSize][2]; 105 uint16_t fNoise[4][kBlockSize][2];
106 SkPoint fGradient[4][kBlockSize]; 106 SkPoint fGradient[4][kBlockSize];
107 SkISize fTileSize; 107 SkISize fTileSize;
108 SkVector fBaseFrequency; 108 SkVector fBaseFrequency;
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 str->append(" seed: "); 1369 str->append(" seed: ");
1370 str->appendScalar(fSeed); 1370 str->appendScalar(fSeed);
1371 str->append(" stitch tiles: "); 1371 str->append(" stitch tiles: ");
1372 str->append(fStitchTiles ? "true " : "false "); 1372 str->append(fStitchTiles ? "true " : "false ");
1373 1373
1374 this->INHERITED::toString(str); 1374 this->INHERITED::toString(str);
1375 1375
1376 str->append(")"); 1376 str->append(")");
1377 } 1377 }
1378 #endif 1378 #endif
OLDNEW
« no previous file with comments | « src/core/SkValidationUtils.h ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698