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

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

Issue 371103003: Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref2
Patch Set: Address comments and update for new YUV effect Created 6 years, 5 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 ///////////////////////////////////////////////////////////////////// 524 /////////////////////////////////////////////////////////////////////
525 525
526 class GrPerlinNoiseEffect : public GrEffect { 526 class GrPerlinNoiseEffect : public GrEffect {
527 public: 527 public:
528 static GrEffectRef* Create(SkPerlinNoiseShader::Type type, 528 static GrEffectRef* Create(SkPerlinNoiseShader::Type type,
529 int numOctaves, bool stitchTiles, 529 int numOctaves, bool stitchTiles,
530 SkPerlinNoiseShader::PaintingData* paintingData, 530 SkPerlinNoiseShader::PaintingData* paintingData,
531 GrTexture* permutationsTexture, GrTexture* noiseT exture, 531 GrTexture* permutationsTexture, GrTexture* noiseT exture,
532 const SkMatrix& matrix, uint8_t alpha) { 532 const SkMatrix& matrix, uint8_t alpha) {
533 AutoEffectUnref effect(SkNEW_ARGS(GrPerlinNoiseEffect, (type, numOctaves , 533 return SkNEW_ARGS(GrPerlinNoiseEffect, (type, numOctaves, stitchTiles, p aintingData,
534 stitchTiles, paintingData, permutationsTexture, noiseTexture, matrix , alpha))); 534 permutationsTexture, noiseTextur e, matrix, alpha));
535 return CreateEffectRef(effect);
536 } 535 }
537 536
538 virtual ~GrPerlinNoiseEffect() { 537 virtual ~GrPerlinNoiseEffect() {
539 SkDELETE(fPaintingData); 538 SkDELETE(fPaintingData);
540 } 539 }
541 540
542 static const char* Name() { return "PerlinNoise"; } 541 static const char* Name() { return "PerlinNoise"; }
543 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { 542 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE {
544 return GrTBackendEffectFactory<GrPerlinNoiseEffect>::getInstance(); 543 return GrTBackendEffectFactory<GrPerlinNoiseEffect>::getInstance();
545 } 544 }
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 str->append(" seed: "); 1042 str->append(" seed: ");
1044 str->appendScalar(fSeed); 1043 str->appendScalar(fSeed);
1045 str->append(" stitch tiles: "); 1044 str->append(" stitch tiles: ");
1046 str->append(fStitchTiles ? "true " : "false "); 1045 str->append(fStitchTiles ? "true " : "false ");
1047 1046
1048 this->INHERITED::toString(str); 1047 this->INHERITED::toString(str);
1049 1048
1050 str->append(")"); 1049 str->append(")");
1051 } 1050 }
1052 #endif 1051 #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