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

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

Issue 654273002: Push isEqual/onIsEqual down from GrProcessor to subclasses. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTableColorFilter.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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 SkPerlinNoiseShader::Type type() const { return fType; } 566 SkPerlinNoiseShader::Type type() const { return fType; }
567 bool stitchTiles() const { return fStitchTiles; } 567 bool stitchTiles() const { return fStitchTiles; }
568 const SkVector& baseFrequency() const { return fPaintingData->fBaseFrequency ; } 568 const SkVector& baseFrequency() const { return fPaintingData->fBaseFrequency ; }
569 int numOctaves() const { return fNumOctaves; } 569 int numOctaves() const { return fNumOctaves; }
570 const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); } 570 const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); }
571 uint8_t alpha() const { return fAlpha; } 571 uint8_t alpha() const { return fAlpha; }
572 572
573 typedef GrGLPerlinNoise GLProcessor; 573 typedef GrGLPerlinNoise GLProcessor;
574 574
575 private: 575 private:
576 virtual bool onIsEqual(const GrProcessor& sBase) const SK_OVERRIDE { 576 virtual bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE {
577 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>(); 577 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>();
578 return fType == s.fType && 578 return fType == s.fType &&
579 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency && 579 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency &&
580 fNumOctaves == s.fNumOctaves && 580 fNumOctaves == s.fNumOctaves &&
581 fStitchTiles == s.fStitchTiles && 581 fStitchTiles == s.fStitchTiles &&
582 fCoordTransform.getMatrix() == s.fCoordTransform.getMatrix() && 582 fCoordTransform.getMatrix() == s.fCoordTransform.getMatrix() &&
583 fAlpha == s.fAlpha && 583 fAlpha == s.fAlpha &&
584 fPermutationsAccess.getTexture() == s.fPermutationsAccess.getText ure() && 584 fPermutationsAccess.getTexture() == s.fPermutationsAccess.getText ure() &&
585 fNoiseAccess.getTexture() == s.fNoiseAccess.getTexture() && 585 fNoiseAccess.getTexture() == s.fNoiseAccess.getTexture() &&
586 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni t; 586 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni t;
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 str->append(" seed: "); 1053 str->append(" seed: ");
1054 str->appendScalar(fSeed); 1054 str->appendScalar(fSeed);
1055 str->append(" stitch tiles: "); 1055 str->append(" stitch tiles: ");
1056 str->append(fStitchTiles ? "true " : "false "); 1056 str->append(fStitchTiles ? "true " : "false ");
1057 1057
1058 this->INHERITED::toString(str); 1058 this->INHERITED::toString(str);
1059 1059
1060 str->append(")"); 1060 str->append(")");
1061 } 1061 }
1062 #endif 1062 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698