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

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

Issue 2180503002: Add destination color space to AsFPArgs. Eliminates last XFORMTODO. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/core/SkPictureShader.cpp ('k') | src/effects/gradients/SkLinearGradient.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 "SkPerlinNoiseShader.h" 8 #include "SkPerlinNoiseShader.h"
9 #include "SkColorFilter.h" 9 #include "SkColorFilter.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 0.99f); 587 0.99f);
588 588
589 sk_sp<SkShader> shader(d->fRandom->nextBool() ? 589 sk_sp<SkShader> shader(d->fRandom->nextBool() ?
590 SkPerlinNoiseShader::MakeFractalNoise(baseFrequencyX, baseFrequencyY, nu mOctaves, seed, 590 SkPerlinNoiseShader::MakeFractalNoise(baseFrequencyX, baseFrequencyY, nu mOctaves, seed,
591 stitchTiles ? &tileSize : nullptr) : 591 stitchTiles ? &tileSize : nullptr) :
592 SkPerlinNoiseShader::MakeTurbulence(baseFrequencyX, baseFrequencyY, numO ctaves, seed, 592 SkPerlinNoiseShader::MakeTurbulence(baseFrequencyX, baseFrequencyY, numO ctaves, seed,
593 stitchTiles ? &tileSize : nullptr)); 593 stitchTiles ? &tileSize : nullptr));
594 594
595 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); 595 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
596 return shader->asFragmentProcessor(SkShader::AsFPArgs(d->fContext, &viewMatr ix, nullptr, 596 return shader->asFragmentProcessor(SkShader::AsFPArgs(d->fContext, &viewMatr ix, nullptr,
597 kNone_SkFilterQuality, 597 kNone_SkFilterQuality, nullptr,
598 SkSourceGammaTreatment ::kRespect)); 598 SkSourceGammaTreatment ::kRespect));
599 } 599 }
600 600
601 void GrGLPerlinNoise::emitCode(EmitArgs& args) { 601 void GrGLPerlinNoise::emitCode(EmitArgs& args) {
602 const GrPerlinNoiseEffect& pne = args.fFp.cast<GrPerlinNoiseEffect>(); 602 const GrPerlinNoiseEffect& pne = args.fFp.cast<GrPerlinNoiseEffect>();
603 603
604 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; 604 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
605 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; 605 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
606 SkString vCoords = fragBuilder->ensureFSCoords2D(args.fCoords, 0); 606 SkString vCoords = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
607 607
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 str->append(" seed: "); 973 str->append(" seed: ");
974 str->appendScalar(fSeed); 974 str->appendScalar(fSeed);
975 str->append(" stitch tiles: "); 975 str->append(" stitch tiles: ");
976 str->append(fStitchTiles ? "true " : "false "); 976 str->append(fStitchTiles ? "true " : "false ");
977 977
978 this->INHERITED::toString(str); 978 this->INHERITED::toString(str);
979 979
980 str->append(")"); 980 str->append(")");
981 } 981 }
982 #endif 982 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698