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

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

Issue 14925010: Move loops that chain together effects into GrGLShaderBuilder from GrGLProgram. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Address comments and fix for emitting code for skipped effects Created 7 years, 7 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLShaderBuilder.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 2013 Google Inc. 2 * Copyright 2013 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 GrGLProgramDesc_DEFINED 8 #ifndef GrGLProgramDesc_DEFINED
9 #define GrGLProgramDesc_DEFINED 9 #define GrGLProgramDesc_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 // Returns this as a uint32_t array to be used as a key in the program cache 33 // Returns this as a uint32_t array to be used as a key in the program cache
34 const uint32_t* asKey() const { 34 const uint32_t* asKey() const {
35 return reinterpret_cast<const uint32_t*>(this); 35 return reinterpret_cast<const uint32_t*>(this);
36 } 36 }
37 37
38 // For unit testing. 38 // For unit testing.
39 void setRandom(SkMWCRandom*, 39 void setRandom(SkMWCRandom*,
40 const GrGpuGL* gpu, 40 const GrGpuGL* gpu,
41 const GrTexture* dummyDstTexture, 41 const GrTexture* dummyDstTexture,
42 const GrEffectStage stages[GrDrawState::kNumStages], 42 const GrEffectStage* stages[GrDrawState::kNumStages],
43 int currAttribIndex); 43 int currAttribIndex);
44 44
45 /** 45 /**
46 * Builds a program descriptor from a GrDrawState. Whether the primitive typ e is points, the 46 * Builds a program descriptor from a GrDrawState. Whether the primitive typ e is points, the
47 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also inputs. 47 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also inputs.
48 */ 48 */
49 static void Build(const GrDrawState&, 49 static void Build(const GrDrawState&,
50 bool isPoints, 50 bool isPoints,
51 GrDrawState::BlendOptFlags, 51 GrDrawState::BlendOptFlags,
52 GrBlendCoeff srcCoeff, 52 GrBlendCoeff srcCoeff,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 int8_t fColorAttributeIndex; 125 int8_t fColorAttributeIndex;
126 int8_t fCoverageAttributeIndex; 126 int8_t fCoverageAttributeIndex;
127 127
128 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all 128 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all
129 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending). 129 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending).
130 friend class GrGLProgram; 130 friend class GrGLProgram;
131 friend class GrGLShaderBuilder; 131 friend class GrGLShaderBuilder;
132 }; 132 };
133 133
134 #endif 134 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698