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

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

Issue 25023003: Implement color filter as GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review comments Created 7 years, 2 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
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 "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 , fNumOctaves(numOctaves) 603 , fNumOctaves(numOctaves)
604 , fStitchTiles(stitchTiles) 604 , fStitchTiles(stitchTiles)
605 , fMatrix(matrix) 605 , fMatrix(matrix)
606 , fAlpha(alpha) { 606 , fAlpha(alpha) {
607 // This (1,1) translation is due to WebKit's 1 based coordinates for the noise 607 // This (1,1) translation is due to WebKit's 1 based coordinates for the noise
608 // (as opposed to 0 based, usually). The same adjustment is in the shade Span() functions. 608 // (as opposed to 0 based, usually). The same adjustment is in the shade Span() functions.
609 SkMatrix m = matrix; 609 SkMatrix m = matrix;
610 m.postTranslate(SK_Scalar1, SK_Scalar1); 610 m.postTranslate(SK_Scalar1, SK_Scalar1);
611 fCoordTransform.reset(kLocal_GrCoordSet, m); 611 fCoordTransform.reset(kLocal_GrCoordSet, m);
612 this->addCoordTransform(&fCoordTransform); 612 this->addCoordTransform(&fCoordTransform);
613 this->setWillNotUseInputColor();
613 } 614 }
614 615
615 SkPerlinNoiseShader::Type fType; 616 SkPerlinNoiseShader::Type fType;
616 GrCoordTransform fCoordTransform; 617 GrCoordTransform fCoordTransform;
617 SkVector fBaseFrequency; 618 SkVector fBaseFrequency;
618 int fNumOctaves; 619 int fNumOctaves;
619 bool fStitchTiles; 620 bool fStitchTiles;
620 SkMatrix fMatrix; 621 SkMatrix fMatrix;
621 uint8_t fAlpha; 622 uint8_t fAlpha;
622 623
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 str->append(" seed: "); 1367 str->append(" seed: ");
1367 str->appendScalar(fSeed); 1368 str->appendScalar(fSeed);
1368 str->append(" stitch tiles: "); 1369 str->append(" stitch tiles: ");
1369 str->append(fStitchTiles ? "true " : "false "); 1370 str->append(fStitchTiles ? "true " : "false ");
1370 1371
1371 this->INHERITED::toString(str); 1372 this->INHERITED::toString(str);
1372 1373
1373 str->append(")"); 1374 str->append(")");
1374 } 1375 }
1375 #endif 1376 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698