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

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

Issue 1709153002: Add more specialized fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make MSVC happy Created 4 years, 10 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 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 static uint32_t GenBaseGradientKey(const GrProcessor&); 417 static uint32_t GenBaseGradientKey(const GrProcessor&);
418 418
419 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses 419 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses
420 // should call this method from their emitCode(). 420 // should call this method from their emitCode().
421 void emitUniforms(GrGLSLUniformHandler*, const GrGradientEffect&); 421 void emitUniforms(GrGLSLUniformHandler*, const GrGradientEffect&);
422 422
423 423
424 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate 424 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate
425 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using 425 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using
426 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup. 426 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup.
427 void emitColor(GrGLSLFragmentBuilder* fragBuilder, 427 void emitColor(GrGLSLFPFragmentBuilder* fragBuilder,
428 GrGLSLUniformHandler* uniformHandler, 428 GrGLSLUniformHandler* uniformHandler,
429 const GrGLSLCaps* caps, 429 const GrGLSLCaps* caps,
430 const GrGradientEffect&, 430 const GrGradientEffect&,
431 const char* gradientTValue, 431 const char* gradientTValue,
432 const char* outputColor, 432 const char* outputColor,
433 const char* inputColor, 433 const char* inputColor,
434 const TextureSamplerArray& samplers); 434 const TextureSamplerArray& samplers);
435 435
436 private: 436 private:
437 enum { 437 enum {
(...skipping 17 matching lines...) Expand all
455 GrGLSLProgramDataManager::UniformHandle fColorStartUni; 455 GrGLSLProgramDataManager::UniformHandle fColorStartUni;
456 GrGLSLProgramDataManager::UniformHandle fColorMidUni; 456 GrGLSLProgramDataManager::UniformHandle fColorMidUni;
457 GrGLSLProgramDataManager::UniformHandle fColorEndUni; 457 GrGLSLProgramDataManager::UniformHandle fColorEndUni;
458 458
459 typedef GrGLSLFragmentProcessor INHERITED; 459 typedef GrGLSLFragmentProcessor INHERITED;
460 }; 460 };
461 461
462 #endif 462 #endif
463 463
464 #endif 464 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698