OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |