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

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

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrPipeline.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 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
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrFragmentProcessor.h" 12 #include "GrFragmentProcessor.h"
13 #include "GrNonAtomicRef.h" 13 #include "GrNonAtomicRef.h"
14 #include "GrPendingProgramElement.h" 14 #include "GrPendingProgramElement.h"
15 #include "GrPrimitiveProcessor.h" 15 #include "GrPrimitiveProcessor.h"
16 #include "GrProcOptInfo.h" 16 #include "GrProcOptInfo.h"
17 #include "GrProgramDesc.h" 17 #include "GrProgramDesc.h"
18 #include "GrScissorState.h" 18 #include "GrScissorState.h"
19 #include "GrStencilSettings.h" 19 #include "GrUserStencilSettings.h"
20 #include "GrWindowRectsState.h" 20 #include "GrWindowRectsState.h"
21 #include "SkMatrix.h" 21 #include "SkMatrix.h"
22 #include "SkRefCnt.h" 22 #include "SkRefCnt.h"
23 23
24 #include "effects/GrCoverageSetOpXP.h" 24 #include "effects/GrCoverageSetOpXP.h"
25 #include "effects/GrDisableColorXP.h" 25 #include "effects/GrDisableColorXP.h"
26 #include "effects/GrPorterDuffXferProcessor.h" 26 #include "effects/GrPorterDuffXferProcessor.h"
27 #include "effects/GrSimpleTextureEffect.h" 27 #include "effects/GrSimpleTextureEffect.h"
28 28
29 class GrBatch; 29 class GrBatch;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 /// @} 142 /// @}
143 143
144 /** 144 /**
145 * Retrieves the currently set render-target. 145 * Retrieves the currently set render-target.
146 * 146 *
147 * @return The currently set render target. 147 * @return The currently set render target.
148 */ 148 */
149 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } 149 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); }
150 150
151 const GrStencilSettings& getStencil() const { return fStencilSettings; } 151 const GrUserStencilSettings* getUserStencil() const { return fUserStencilSet tings; }
152 152
153 const GrScissorState& getScissorState() const { return fScissorState; } 153 const GrScissorState& getScissorState() const { return fScissorState; }
154 154
155 const GrWindowRectsState& getWindowRectsState() const { return fWindowRectsS tate; } 155 const GrWindowRectsState& getWindowRectsState() const { return fWindowRectsS tate; }
156 156
157 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 157 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
158 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 158 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
159 bool getDisableOutputConversionToSRGB() const { 159 bool getDisableOutputConversionToSRGB() const {
160 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 160 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
161 } 161 }
162 bool getAllowSRGBInputs() const { 162 bool getAllowSRGBInputs() const {
163 return SkToBool(fFlags & kAllowSRGBInputs_Flag); 163 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
164 } 164 }
165 bool usesDistanceVectorField() const { 165 bool usesDistanceVectorField() const {
166 return SkToBool(fFlags & kUsesDistanceVectorField_Flag); 166 return SkToBool(fFlags & kUsesDistanceVectorField_Flag);
167 } 167 }
168 bool hasStencilClip() const { 168 bool hasStencilClip() const {
169 return SkToBool(fFlags & kHasStencilClip_Flag); 169 return SkToBool(fFlags & kHasStencilClip_Flag);
170 } 170 }
171 bool isStencilEnabled() const {
172 return SkToBool(fFlags & kStencilEnabled_Flag);
173 }
171 174
172 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 175 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
173 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s); 176 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s);
174 } 177 }
175 178
176 /** 179 /**
177 * Gets whether the target is drawing clockwise, counterclockwise, 180 * Gets whether the target is drawing clockwise, counterclockwise,
178 * or both faces. 181 * or both faces.
179 * @return the current draw face(s). 182 * @return the current draw face(s).
180 */ 183 */
(...skipping 25 matching lines...) Expand all
206 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 209 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
207 const GrCaps&); 210 const GrCaps&);
208 211
209 enum Flags { 212 enum Flags {
210 kHWAA_Flag = 0x1, 213 kHWAA_Flag = 0x1,
211 kSnapVertices_Flag = 0x2, 214 kSnapVertices_Flag = 0x2,
212 kDisableOutputConversionToSRGB_Flag = 0x4, 215 kDisableOutputConversionToSRGB_Flag = 0x4,
213 kAllowSRGBInputs_Flag = 0x8, 216 kAllowSRGBInputs_Flag = 0x8,
214 kUsesDistanceVectorField_Flag = 0x10, 217 kUsesDistanceVectorField_Flag = 0x10,
215 kHasStencilClip_Flag = 0x20, 218 kHasStencilClip_Flag = 0x20,
219 kStencilEnabled_Flag = 0x40,
216 }; 220 };
217 221
218 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 222 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
219 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 223 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
220 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 224 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
221 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 225 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
222 RenderTarget fRenderTarget; 226 RenderTarget fRenderTarget;
223 GrScissorState fScissorState; 227 GrScissorState fScissorState;
224 GrWindowRectsState fWindowRectsState; 228 GrWindowRectsState fWindowRectsState;
225 GrStencilSettings fStencilSettings; 229 const GrUserStencilSettings* fUserStencilSettings;
226 GrDrawFace fDrawFace; 230 GrDrawFace fDrawFace;
227 uint32_t fFlags; 231 uint32_t fFlags;
228 ProgramXferProcessor fXferProcessor; 232 ProgramXferProcessor fXferProcessor;
229 FragmentProcessorArray fFragmentProcessors; 233 FragmentProcessorArray fFragmentProcessors;
230 bool fIgnoresCoverage; 234 bool fIgnoresCoverage;
231 235
232 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 236 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
233 int fNumColorProcessors; 237 int fNumColorProcessors;
234 238
235 typedef SkRefCnt INHERITED; 239 typedef SkRefCnt INHERITED;
236 }; 240 };
237 241
238 #endif 242 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698