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

Side by Side Diff: src/gpu/gl/GrGLEffect.h

Issue 26190003: Potentially optimize some GrGLEffects for known input color values (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/effects/GrTextureDomainEffect.cpp ('k') | src/gpu/gl/GrGLProgramEffects.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 GrGLEffect_DEFINED 8 #ifndef GrGLEffect_DEFINED
9 #define GrGLEffect_DEFINED 9 #define GrGLEffect_DEFINED
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 color is solid white, trans black, known to be opaqu e, etc.) that allows 72 color is solid white, trans black, known to be opaqu e, etc.) that allows
73 the effect to communicate back similar known info ab out its output. 73 the effect to communicate back similar known info ab out its output.
74 @param samplers One entry for each GrTextureAccess of the GrEffect t hat generated the 74 @param samplers One entry for each GrTextureAccess of the GrEffect t hat generated the
75 GrGLEffect. These can be passed to the builder to em it texture 75 GrGLEffect. These can be passed to the builder to em it texture
76 reads in the generated code. 76 reads in the generated code.
77 */ 77 */
78 virtual void emitCode(GrGLShaderBuilder* builder, 78 virtual void emitCode(GrGLShaderBuilder* builder,
79 const GrDrawEffect& drawEffect, 79 const GrDrawEffect& drawEffect,
80 EffectKey key, 80 EffectKey key,
81 const char* outputColor, 81 const char* outputColor,
82 const char* inputColor, 82 const GrGLSLExpr4& inputColor,
83 const TransformedCoordsArray& coords, 83 const TransformedCoordsArray& coords,
84 const TextureSamplerArray& samplers) = 0; 84 const TextureSamplerArray& samplers) = 0;
85 85
86 /** A GrGLEffect instance can be reused with any GrEffect that produces the same stage 86 /** A GrGLEffect instance can be reused with any GrEffect that produces the same stage
87 key; this function reads data from a stage and uploads any uniform varia bles required 87 key; this function reads data from a stage and uploads any uniform varia bles required
88 by the shaders created in emitCode(). The GrEffect installed in the GrEf fectStage is 88 by the shaders created in emitCode(). The GrEffect installed in the GrEf fectStage is
89 guaranteed to be of the same type that created this GrGLEffect and to ha ve an identical 89 guaranteed to be of the same type that created this GrGLEffect and to ha ve an identical
90 EffectKey as the one that created this GrGLEffect. Effects that use loca l coords have 90 EffectKey as the one that created this GrGLEffect. Effects that use loca l coords have
91 to consider whether the GrEffectStage's coord change matrix should be us ed. When explicit 91 to consider whether the GrEffectStage's coord change matrix should be us ed. When explicit
92 local coordinates are used it can be ignored. */ 92 local coordinates are used it can be ignored. */
(...skipping 10 matching lines...) Expand all
103 protected: 103 protected:
104 const GrBackendEffectFactory& fFactory; 104 const GrBackendEffectFactory& fFactory;
105 105
106 private: 106 private:
107 friend class GrGLVertexEffect; // to set fIsVertexEffect 107 friend class GrGLVertexEffect; // to set fIsVertexEffect
108 108
109 bool fIsVertexEffect; 109 bool fIsVertexEffect;
110 }; 110 };
111 111
112 #endif 112 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomainEffect.cpp ('k') | src/gpu/gl/GrGLProgramEffects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698