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

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

Issue 571163002: removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: rebase after revert Created 6 years, 3 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 }; 396 };
397 397
398 /////////////////////////////////////////////////////////////////////////////// 398 ///////////////////////////////////////////////////////////////////////////////
399 399
400 // Base class for GL gradient effects 400 // Base class for GL gradient effects
401 class GrGLGradientEffect : public GrGLEffect { 401 class GrGLGradientEffect : public GrGLEffect {
402 public: 402 public:
403 GrGLGradientEffect(const GrBackendEffectFactory& factory); 403 GrGLGradientEffect(const GrBackendEffectFactory& factory);
404 virtual ~GrGLGradientEffect(); 404 virtual ~GrGLGradientEffect();
405 405
406 virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) SK_ OVERRIDE; 406 virtual void setData(const GrGLProgramDataManager&, const GrEffect&) SK_OVER RIDE;
407 407
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 GrDrawEffect&); 414 static uint32_t GenBaseGradientKey(const GrEffect&);
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(GrGLProgramBuilder* 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(GrGLProgramBuilder* builder,
(...skipping 41 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 GrGLEffect INHERITED; 470 typedef GrGLEffect 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