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

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

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits Created 5 years, 1 month 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 const SkPerlinNoiseShader::StitchData& stitchData() const { return fPainting Data->fStitchDataInit; } 528 const SkPerlinNoiseShader::StitchData& stitchData() const { return fPainting Data->fStitchDataInit; }
529 529
530 SkPerlinNoiseShader::Type type() const { return fType; } 530 SkPerlinNoiseShader::Type type() const { return fType; }
531 bool stitchTiles() const { return fStitchTiles; } 531 bool stitchTiles() const { return fStitchTiles; }
532 const SkVector& baseFrequency() const { return fPaintingData->fBaseFrequency ; } 532 const SkVector& baseFrequency() const { return fPaintingData->fBaseFrequency ; }
533 int numOctaves() const { return fNumOctaves; } 533 int numOctaves() const { return fNumOctaves; }
534 const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); } 534 const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); }
535 535
536 private: 536 private:
537 GrGLSLFragmentProcessor* onCreateGLInstance() const override { 537 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
538 return new GrGLPerlinNoise(*this); 538 return new GrGLPerlinNoise(*this);
539 } 539 }
540 540
541 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, 541 virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
542 GrProcessorKeyBuilder* b) const override { 542 GrProcessorKeyBuilder* b) const override {
543 GrGLPerlinNoise::GenKey(*this, caps, b); 543 GrGLPerlinNoise::GenKey(*this, caps, b);
544 } 544 }
545 545
546 bool onIsEqual(const GrFragmentProcessor& sBase) const override { 546 bool onIsEqual(const GrFragmentProcessor& sBase) const override {
547 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>(); 547 const GrPerlinNoiseEffect& s = sBase.cast<GrPerlinNoiseEffect>();
548 return fType == s.fType && 548 return fType == s.fType &&
549 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency && 549 fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency &&
550 fNumOctaves == s.fNumOctaves && 550 fNumOctaves == s.fNumOctaves &&
551 fStitchTiles == s.fStitchTiles && 551 fStitchTiles == s.fStitchTiles &&
552 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni t; 552 fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataIni t;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 str->append(" seed: "); 996 str->append(" seed: ");
997 str->appendScalar(fSeed); 997 str->appendScalar(fSeed);
998 str->append(" stitch tiles: "); 998 str->append(" stitch tiles: ");
999 str->append(fStitchTiles ? "true " : "false "); 999 str->append(fStitchTiles ? "true " : "false ");
1000 1000
1001 this->INHERITED::toString(str); 1001 this->INHERITED::toString(str);
1002 1002
1003 str->append(")"); 1003 str->append(")");
1004 } 1004 }
1005 #endif 1005 #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