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

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

Issue 648463003: FPs now use the correct builder types(just a rename) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/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 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 protected: 408 protected:
409 /** 409 /**
410 * Subclasses must call this. It will return a key for the part of the shade r code controlled 410 * Subclasses must call this. It will return a key for the part of the shade r code controlled
411 * by the base class. The subclasses must stick it in their key and then pas s it to the below 411 * by the base class. The subclasses must stick it in their key and then pas s it to the below
412 * emit* functions from their emitCode function. 412 * emit* functions from their emitCode function.
413 */ 413 */
414 static uint32_t GenBaseGradientKey(const GrProcessor&); 414 static uint32_t GenBaseGradientKey(const GrProcessor&);
415 415
416 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses 416 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses
417 // should call this method from their emitCode(). 417 // should call this method from their emitCode().
418 void emitUniforms(GrGLProgramBuilder* builder, uint32_t baseKey); 418 void emitUniforms(GrGLFPBuilder* builder, uint32_t baseKey);
419 419
420 420
421 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate 421 // emit code that gets a fragment's color from an expression for t; Has bran ches for 3 separate
422 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using 422 // control flows inside -- 2 color gradients, 3 color symmetric gradients (b oth using
423 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup. 423 // native GLSL mix), and 4+ color gradients that use the traditional texture lookup.
424 void emitColor(GrGLProgramBuilder* builder, 424 void emitColor(GrGLFPBuilder* builder,
425 const char* gradientTValue, 425 const char* gradientTValue,
426 uint32_t baseKey, 426 uint32_t baseKey,
427 const char* outputColor, 427 const char* outputColor,
428 const char* inputColor, 428 const char* inputColor,
429 const TextureSamplerArray& samplers); 429 const TextureSamplerArray& samplers);
430 430
431 private: 431 private:
432 enum { 432 enum {
433 kPremulTypeKeyBitCnt = 1, 433 kPremulTypeKeyBitCnt = 1,
434 kPremulTypeMask = 1, 434 kPremulTypeMask = 1,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 GrGLProgramDataManager::UniformHandle fColorStartUni; 466 GrGLProgramDataManager::UniformHandle fColorStartUni;
467 GrGLProgramDataManager::UniformHandle fColorMidUni; 467 GrGLProgramDataManager::UniformHandle fColorMidUni;
468 GrGLProgramDataManager::UniformHandle fColorEndUni; 468 GrGLProgramDataManager::UniformHandle fColorEndUni;
469 469
470 typedef GrGLFragmentProcessor INHERITED; 470 typedef GrGLFragmentProcessor INHERITED;
471 }; 471 };
472 472
473 #endif 473 #endif
474 474
475 #endif 475 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698