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

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: Removed DVF from prog builder key, not necessary 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const GrScissorState& getScissorState() const { return fScissorState; } 149 const GrScissorState& getScissorState() const { return fScissorState; }
150 150
151 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 151 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
152 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 152 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
153 bool getDisableOutputConversionToSRGB() const { 153 bool getDisableOutputConversionToSRGB() const {
154 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 154 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
155 } 155 }
156 bool getAllowSRGBInputs() const { 156 bool getAllowSRGBInputs() const {
157 return SkToBool(fFlags & kAllowSRGBInputs_Flag); 157 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
158 } 158 }
159 bool usesDistanceVectorField() const {
160 return SkToBool(fFlags & kUsesDistanceVectorField_Flag);
161 }
159 bool hasStencilClip() const { 162 bool hasStencilClip() const {
160 return SkToBool(fFlags & kHasStencilClip_Flag); 163 return SkToBool(fFlags & kHasStencilClip_Flag);
161 } 164 }
162 165
166
163 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 167 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
164 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s); 168 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s);
165 } 169 }
166 170
167 /** 171 /**
168 * Gets whether the target is drawing clockwise, counterclockwise, 172 * Gets whether the target is drawing clockwise, counterclockwise,
169 * or both faces. 173 * or both faces.
170 * @return the current draw face(s). 174 * @return the current draw face(s).
171 */ 175 */
172 GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; } 176 GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; }
(...skipping 22 matching lines...) Expand all
195 * blend coeffs will represent those used by backend API. 199 * blend coeffs will represent those used by backend API.
196 */ 200 */
197 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 201 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
198 const GrCaps&); 202 const GrCaps&);
199 203
200 enum Flags { 204 enum Flags {
201 kHWAA_Flag = 0x1, 205 kHWAA_Flag = 0x1,
202 kSnapVertices_Flag = 0x2, 206 kSnapVertices_Flag = 0x2,
203 kDisableOutputConversionToSRGB_Flag = 0x4, 207 kDisableOutputConversionToSRGB_Flag = 0x4,
204 kAllowSRGBInputs_Flag = 0x8, 208 kAllowSRGBInputs_Flag = 0x8,
205 kHasStencilClip_Flag = 0x10 209 kUsesDistanceVectorField_Flag = 0x10,
210 kHasStencilClip_Flag = 0x20,
206 }; 211 };
207 212
208 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 213 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
209 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 214 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
210 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 215 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
211 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 216 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
212 RenderTarget fRenderTarget; 217 RenderTarget fRenderTarget;
213 GrScissorState fScissorState; 218 GrScissorState fScissorState;
214 GrStencilSettings fStencilSettings; 219 GrStencilSettings fStencilSettings;
215 GrPipelineBuilder::DrawFace fDrawFace; 220 GrPipelineBuilder::DrawFace fDrawFace;
216 uint32_t fFlags; 221 uint32_t fFlags;
217 ProgramXferProcessor fXferProcessor; 222 ProgramXferProcessor fXferProcessor;
218 FragmentProcessorArray fFragmentProcessors; 223 FragmentProcessorArray fFragmentProcessors;
219 bool fIgnoresCoverage; 224 bool fIgnoresCoverage;
220 225
221 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 226 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
222 int fNumColorProcessors; 227 int fNumColorProcessors;
223 228
224 typedef SkRefCnt INHERITED; 229 typedef SkRefCnt INHERITED;
225 }; 230 };
226 231
227 #endif 232 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698