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

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

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (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
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type, 543 GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type,
544 int numOctaves, bool stitchTiles, 544 int numOctaves, bool stitchTiles,
545 SkPerlinNoiseShader::PaintingData* paintingData, 545 SkPerlinNoiseShader::PaintingData* paintingData,
546 GrTexture* permutationsTexture, GrTexture* noiseTexture, 546 GrTexture* permutationsTexture, GrTexture* noiseTexture,
547 const SkMatrix& matrix) 547 const SkMatrix& matrix)
548 : fType(type) 548 : fType(type)
549 , fNumOctaves(numOctaves) 549 , fNumOctaves(numOctaves)
550 , fStitchTiles(stitchTiles) 550 , fStitchTiles(stitchTiles)
551 , fPermutationsAccess(permutationsTexture) 551 , fPermutationsAccess(permutationsTexture, nullptr)
552 , fNoiseAccess(noiseTexture) 552 , fNoiseAccess(noiseTexture, nullptr)
553 , fPaintingData(paintingData) { 553 , fPaintingData(paintingData) {
554 this->initClassID<GrPerlinNoiseEffect>(); 554 this->initClassID<GrPerlinNoiseEffect>();
555 this->addTextureAccess(&fPermutationsAccess); 555 this->addTextureAccess(&fPermutationsAccess);
556 this->addTextureAccess(&fNoiseAccess); 556 this->addTextureAccess(&fNoiseAccess);
557 fCoordTransform.reset(kLocal_GrCoordSet, matrix); 557 fCoordTransform.reset(kLocal_GrCoordSet, matrix);
558 this->addCoordTransform(&fCoordTransform); 558 this->addCoordTransform(&fCoordTransform);
559 } 559 }
560 560
561 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 561 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
562 562
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 str->append(" seed: "); 977 str->append(" seed: ");
978 str->appendScalar(fSeed); 978 str->appendScalar(fSeed);
979 str->append(" stitch tiles: "); 979 str->append(" stitch tiles: ");
980 str->append(fStitchTiles ? "true " : "false "); 980 str->append(fStitchTiles ? "true " : "false ");
981 981
982 this->INHERITED::toString(str); 982 this->INHERITED::toString(str);
983 983
984 str->append(")"); 984 str->append(")");
985 } 985 }
986 #endif 986 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698