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

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 1885863004: Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unneeded assert Created 4 years, 8 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/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrTextureDomain.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkGradientShaderPriv_DEFINED 8 #ifndef SkGradientShaderPriv_DEFINED
9 #define SkGradientShaderPriv_DEFINED 9 #define SkGradientShaderPriv_DEFINED
10 10
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate 416 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate
417 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using 417 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using
418 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup. 418 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup.
419 void emitColor(GrGLSLFPFragmentBuilder* fragBuilder, 419 void emitColor(GrGLSLFPFragmentBuilder* fragBuilder,
420 GrGLSLUniformHandler* uniformHandler, 420 GrGLSLUniformHandler* uniformHandler,
421 const GrGLSLCaps* caps, 421 const GrGLSLCaps* caps,
422 const GrGradientEffect&, 422 const GrGradientEffect&,
423 const char* gradientTValue, 423 const char* gradientTValue,
424 const char* outputColor, 424 const char* outputColor,
425 const char* inputColor, 425 const char* inputColor,
426 const SamplerArray& texSamplers); 426 const SamplerHandle* texSamplers);
427 427
428 private: 428 private:
429 enum { 429 enum {
430 kPremulTypeKeyBitCnt = 1, 430 kPremulTypeKeyBitCnt = 1,
431 kPremulTypeMask = 1, 431 kPremulTypeMask = 1,
432 kPremulBeforeInterpKey = kPremulTypeMask, 432 kPremulBeforeInterpKey = kPremulTypeMask,
433 433
434 kTwoColorKey = 2 << kPremulTypeKeyBitCnt, 434 kTwoColorKey = 2 << kPremulTypeKeyBitCnt,
435 kThreeColorKey = 3 << kPremulTypeKeyBitCnt, 435 kThreeColorKey = 3 << kPremulTypeKeyBitCnt,
436 kColorKeyMask = kTwoColorKey | kThreeColorKey, 436 kColorKeyMask = kTwoColorKey | kThreeColorKey,
(...skipping 10 matching lines...) Expand all
447 GrGLSLProgramDataManager::UniformHandle fColorStartUni; 447 GrGLSLProgramDataManager::UniformHandle fColorStartUni;
448 GrGLSLProgramDataManager::UniformHandle fColorMidUni; 448 GrGLSLProgramDataManager::UniformHandle fColorMidUni;
449 GrGLSLProgramDataManager::UniformHandle fColorEndUni; 449 GrGLSLProgramDataManager::UniformHandle fColorEndUni;
450 450
451 typedef GrGLSLFragmentProcessor INHERITED; 451 typedef GrGLSLFragmentProcessor INHERITED;
452 }; 452 };
453 453
454 #endif 454 #endif
455 455
456 #endif 456 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698