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

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

Issue 2114993002: GrFP can express distance vector field req., program builder declares variable for it (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-bevel-api-change
Patch Set: Quick rebase fix Created 4 years, 5 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 const GrScissorState& getScissorState() const { return fScissorState; } 153 const GrScissorState& getScissorState() const { return fScissorState; }
154 154
155 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 155 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
156 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 156 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
157 bool getDisableOutputConversionToSRGB() const { 157 bool getDisableOutputConversionToSRGB() const {
158 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 158 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
159 } 159 }
160 bool getAllowSRGBInputs() const { 160 bool getAllowSRGBInputs() const {
161 return SkToBool(fFlags & kAllowSRGBInputs_Flag); 161 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
162 } 162 }
163 bool usesDistanceVectorField() const {
164 return SkToBool(fFlags & kUsesDistanceVectorField_Flag);
165 }
163 bool hasStencilClip() const { 166 bool hasStencilClip() const {
164 return SkToBool(fFlags & kHasStencilClip_Flag); 167 return SkToBool(fFlags & kHasStencilClip_Flag);
165 } 168 }
166 169
170
egdaniel 2016/07/26 13:48:24 extra \n
dvonbeck 2016/07/26 14:38:27 Done.
167 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 171 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
168 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s); 172 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s);
169 } 173 }
170 174
171 /** 175 /**
172 * Gets whether the target is drawing clockwise, counterclockwise, 176 * Gets whether the target is drawing clockwise, counterclockwise,
173 * or both faces. 177 * or both faces.
174 * @return the current draw face(s). 178 * @return the current draw face(s).
175 */ 179 */
176 GrDrawFace getDrawFace() const { return fDrawFace; } 180 GrDrawFace getDrawFace() const { return fDrawFace; }
(...skipping 22 matching lines...) Expand all
199 * blend coeffs will represent those used by backend API. 203 * blend coeffs will represent those used by backend API.
200 */ 204 */
201 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 205 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
202 const GrCaps&); 206 const GrCaps&);
203 207
204 enum Flags { 208 enum Flags {
205 kHWAA_Flag = 0x1, 209 kHWAA_Flag = 0x1,
206 kSnapVertices_Flag = 0x2, 210 kSnapVertices_Flag = 0x2,
207 kDisableOutputConversionToSRGB_Flag = 0x4, 211 kDisableOutputConversionToSRGB_Flag = 0x4,
208 kAllowSRGBInputs_Flag = 0x8, 212 kAllowSRGBInputs_Flag = 0x8,
209 kHasStencilClip_Flag = 0x10 213 kUsesDistanceVectorField_Flag = 0x10,
214 kHasStencilClip_Flag = 0x20,
210 }; 215 };
211 216
212 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 217 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
213 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 218 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
214 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 219 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
215 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 220 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
216 RenderTarget fRenderTarget; 221 RenderTarget fRenderTarget;
217 GrScissorState fScissorState; 222 GrScissorState fScissorState;
218 GrStencilSettings fStencilSettings; 223 GrStencilSettings fStencilSettings;
219 GrDrawFace fDrawFace; 224 GrDrawFace fDrawFace;
220 uint32_t fFlags; 225 uint32_t fFlags;
221 ProgramXferProcessor fXferProcessor; 226 ProgramXferProcessor fXferProcessor;
222 FragmentProcessorArray fFragmentProcessors; 227 FragmentProcessorArray fFragmentProcessors;
223 bool fIgnoresCoverage; 228 bool fIgnoresCoverage;
224 229
225 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 230 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
226 int fNumColorProcessors; 231 int fNumColorProcessors;
227 232
228 typedef SkRefCnt INHERITED; 233 typedef SkRefCnt INHERITED;
229 }; 234 };
230 235
231 #endif 236 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698