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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile 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/SkXfermodeImageFilter.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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 0.99f); 601 0.99f);
602 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, 602 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f,
603 0.99f); 603 0.99f);
604 604
605 SkAutoTUnref<SkShader> shader(d->fRandom->nextBool() ? 605 SkAutoTUnref<SkShader> shader(d->fRandom->nextBool() ?
606 SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed, 606 SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed,
607 stitchTiles ? &tileSize : nullpt r) : 607 stitchTiles ? &tileSize : nullpt r) :
608 SkPerlinNoiseShader::CreateTurbulence(baseFrequencyX, baseFrequencyY, nu mOctaves, seed, 608 SkPerlinNoiseShader::CreateTurbulence(baseFrequencyX, baseFrequencyY, nu mOctaves, seed,
609 stitchTiles ? &tileSize : nullptr)) ; 609 stitchTiles ? &tileSize : nullptr)) ;
610 610
611 GrPaint grPaint;
612 return shader->asFragmentProcessor(d->fContext, 611 return shader->asFragmentProcessor(d->fContext,
613 GrTest::TestMatrix(d->fRandom), nullptr, 612 GrTest::TestMatrix(d->fRandom), nullptr,
614 kNone_SkFilterQuality); 613 kNone_SkFilterQuality);
615 } 614 }
616 615
617 GrGLPerlinNoise::GrGLPerlinNoise(const GrProcessor& processor) 616 GrGLPerlinNoise::GrGLPerlinNoise(const GrProcessor& processor)
618 : fType(processor.cast<GrPerlinNoiseEffect>().type()) 617 : fType(processor.cast<GrPerlinNoiseEffect>().type())
619 , fStitchTiles(processor.cast<GrPerlinNoiseEffect>().stitchTiles()) 618 , fStitchTiles(processor.cast<GrPerlinNoiseEffect>().stitchTiles())
620 , fNumOctaves(processor.cast<GrPerlinNoiseEffect>().numOctaves()) { 619 , fNumOctaves(processor.cast<GrPerlinNoiseEffect>().numOctaves()) {
621 } 620 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 str->append(" seed: "); 995 str->append(" seed: ");
997 str->appendScalar(fSeed); 996 str->appendScalar(fSeed);
998 str->append(" stitch tiles: "); 997 str->append(" stitch tiles: ");
999 str->append(fStitchTiles ? "true " : "false "); 998 str->append(fStitchTiles ? "true " : "false ");
1000 999
1001 this->INHERITED::toString(str); 1000 this->INHERITED::toString(str);
1002 1001
1003 str->append(")"); 1002 str->append(")");
1004 } 1003 }
1005 #endif 1004 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698