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

Side by Side Diff: src/gpu/GrPipeline.h

Issue 1734163002: Replace fWillReadFragmentPosition with a bitfield (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 GrPipeline_DEFINED 8 #ifndef GrPipeline_DEFINED
9 #define GrPipeline_DEFINED 9 #define GrPipeline_DEFINED
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 /** 153 /**
154 * Gets whether the target is drawing clockwise, counterclockwise, 154 * Gets whether the target is drawing clockwise, counterclockwise,
155 * or both faces. 155 * or both faces.
156 * @return the current draw face(s). 156 * @return the current draw face(s).
157 */ 157 */
158 GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; } 158 GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; }
159 159
160 160
161 /////////////////////////////////////////////////////////////////////////// 161 ///////////////////////////////////////////////////////////////////////////
162 162
163 bool readsFragPosition() const { return fReadsFragPosition; } 163 bool readsFragPosition() const {
164 return fBuiltInState & GrProcessor::kFragmentPosition_BuiltInState;
165 }
166
164 bool ignoresCoverage() const { return fIgnoresCoverage; } 167 bool ignoresCoverage() const { return fIgnoresCoverage; }
165 168
166 private: 169 private:
167 GrPipeline() { /** Initialized in factory function*/ } 170 GrPipeline() { /** Initialized in factory function*/ }
168 171
169 /** 172 /**
170 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization. 173 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization.
171 */ 174 */
172 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds, 175 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds,
173 GrXferProcessor::OptFlags, 176 GrXferProcessor::OptFlags,
(...skipping 19 matching lines...) Expand all
193 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 196 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
194 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 197 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
195 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 198 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
196 RenderTarget fRenderTarget; 199 RenderTarget fRenderTarget;
197 GrScissorState fScissorState; 200 GrScissorState fScissorState;
198 GrStencilSettings fStencilSettings; 201 GrStencilSettings fStencilSettings;
199 GrPipelineBuilder::DrawFace fDrawFace; 202 GrPipelineBuilder::DrawFace fDrawFace;
200 uint32_t fFlags; 203 uint32_t fFlags;
201 ProgramXferProcessor fXferProcessor; 204 ProgramXferProcessor fXferProcessor;
202 FragmentProcessorArray fFragmentProcessors; 205 FragmentProcessorArray fFragmentProcessors;
203 bool fReadsFragPosition; 206 GrProcessor::BuiltInState fBuiltInState;
204 bool fIgnoresCoverage; 207 bool fIgnoresCoverage;
205 208
206 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 209 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
207 int fNumColorProcessors; 210 int fNumColorProcessors;
208 211
209 typedef SkRefCnt INHERITED; 212 typedef SkRefCnt INHERITED;
210 }; 213 };
211 214
212 #endif 215 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698