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

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

Issue 154623002: Stop discarding in frag shader when coverage is zero and stencil writes are enabled (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: save all the files Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.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 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 struct KeyHeader { 146 struct KeyHeader {
147 GrGLShaderBuilder::DstReadKey fDstReadKey; // set by GrGLShaderBuil der if there 147 GrGLShaderBuilder::DstReadKey fDstReadKey; // set by GrGLShaderBuil der if there
148 // are effects that must read the dst. 148 // are effects that must read the dst.
149 // Otherwise, 0. 149 // Otherwise, 0.
150 GrGLShaderBuilder::FragPosKey fFragPosKey; // set by GrGLShaderBuil der if there are 150 GrGLShaderBuilder::FragPosKey fFragPosKey; // set by GrGLShaderBuil der if there are
151 // effects that read the fragment position. 151 // effects that read the fragment position.
152 // Otherwise, 0. 152 // Otherwise, 0.
153 153
154 // should the FS discard if the coverage is zero (to avoid stencil manip ulation)
155 SkBool8 fDiscardIfZeroCoverage;
156
157 ColorInput fColorInput : 8; 154 ColorInput fColorInput : 8;
158 ColorInput fCoverageInput : 8; 155 ColorInput fCoverageInput : 8;
159 CoverageOutput fCoverageOutput : 8; 156 CoverageOutput fCoverageOutput : 8;
160 157
161 SkBool8 fHasVertexCode; 158 SkBool8 fHasVertexCode;
162 SkBool8 fEmitsPointSize; 159 SkBool8 fEmitsPointSize;
163 160
164 // To enable experimental geometry shader code (not for use in 161 // To enable experimental geometry shader code (not for use in
165 // production) 162 // production)
166 #if GR_GL_EXPERIMENTAL_GS 163 #if GR_GL_EXPERIMENTAL_GS
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 215
219 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all 216 // GrGLProgram and GrGLShaderBuilder read the private fields to generate cod e. TODO: Move all
220 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending). 217 // code generation to GrGLShaderBuilder (and maybe add getters rather than f riending).
221 friend class GrGLProgram; 218 friend class GrGLProgram;
222 friend class GrGLShaderBuilder; 219 friend class GrGLShaderBuilder;
223 friend class GrGLFullShaderBuilder; 220 friend class GrGLFullShaderBuilder;
224 friend class GrGLFragmentOnlyShaderBuilder; 221 friend class GrGLFragmentOnlyShaderBuilder;
225 }; 222 };
226 223
227 #endif 224 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698