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

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

Issue 1966763002: Eliminate special case nvpr batch handling (Closed) Base URL: https://skia.googlesource.com/skia.git@reallyupload_userstencil
Patch Set: fixes Created 4 years, 7 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
« no previous file with comments | « src/gpu/GrPathRendering.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
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class GrPipeline : public GrNonAtomicRef<GrPipeline> { 44 class GrPipeline : public GrNonAtomicRef<GrPipeline> {
45 public: 45 public:
46 /////////////////////////////////////////////////////////////////////////// 46 ///////////////////////////////////////////////////////////////////////////
47 /// @name Creation 47 /// @name Creation
48 48
49 struct CreateArgs { 49 struct CreateArgs {
50 const GrPipelineBuilder* fPipelineBuilder; 50 const GrPipelineBuilder* fPipelineBuilder;
51 const GrCaps* fCaps; 51 const GrCaps* fCaps;
52 GrPipelineOptimizations fOpts; 52 GrPipelineOptimizations fOpts;
53 const GrScissorState* fScissor; 53 const GrScissorState* fScissor;
54 int fNumStencilBits;
55 bool fHasStencilClip; 54 bool fHasStencilClip;
56 GrXferProcessor::DstTexture fDstTexture; 55 GrXferProcessor::DstTexture fDstTexture;
57 }; 56 };
58 57
59 /** Creates a pipeline into a pre-allocated buffer */ 58 /** Creates a pipeline into a pre-allocated buffer */
60 static GrPipeline* CreateAt(void* memory, const CreateArgs&, GrXPOverridesFo rBatch*); 59 static GrPipeline* CreateAt(void* memory, const CreateArgs&, GrXPOverridesFo rBatch*);
61 60
62 /// @} 61 /// @}
63 62
64 /////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const GrScissorState& getScissorState() const { return fScissorState; } 145 const GrScissorState& getScissorState() const { return fScissorState; }
147 146
148 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 147 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
149 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 148 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
150 bool getDisableOutputConversionToSRGB() const { 149 bool getDisableOutputConversionToSRGB() const {
151 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 150 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
152 } 151 }
153 bool getAllowSRGBInputs() const { 152 bool getAllowSRGBInputs() const {
154 return SkToBool(fFlags & kAllowSRGBInputs_Flag); 153 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
155 } 154 }
155 bool hasStencilClip() const {
156 return SkToBool(fFlags & kHasStencilClip_Flag);
157 }
156 158
157 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 159 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
158 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s); 160 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s);
159 } 161 }
160 162
161 /** 163 /**
162 * Gets whether the target is drawing clockwise, counterclockwise, 164 * Gets whether the target is drawing clockwise, counterclockwise,
163 * or both faces. 165 * or both faces.
164 * @return the current draw face(s). 166 * @return the current draw face(s).
165 */ 167 */
(...skipping 23 matching lines...) Expand all
189 * blend coeffs will represent those used by backend API. 191 * blend coeffs will represent those used by backend API.
190 */ 192 */
191 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 193 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
192 const GrCaps&); 194 const GrCaps&);
193 195
194 enum Flags { 196 enum Flags {
195 kHWAA_Flag = 0x1, 197 kHWAA_Flag = 0x1,
196 kSnapVertices_Flag = 0x2, 198 kSnapVertices_Flag = 0x2,
197 kDisableOutputConversionToSRGB_Flag = 0x4, 199 kDisableOutputConversionToSRGB_Flag = 0x4,
198 kAllowSRGBInputs_Flag = 0x8, 200 kAllowSRGBInputs_Flag = 0x8,
201 kHasStencilClip_Flag = 0x10
199 }; 202 };
200 203
201 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 204 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
202 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 205 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
203 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 206 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
204 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 207 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
205 RenderTarget fRenderTarget; 208 RenderTarget fRenderTarget;
206 GrScissorState fScissorState; 209 GrScissorState fScissorState;
207 GrStencilSettings fStencilSettings; 210 GrStencilSettings fStencilSettings;
208 GrPipelineBuilder::DrawFace fDrawFace; 211 GrPipelineBuilder::DrawFace fDrawFace;
209 uint32_t fFlags; 212 uint32_t fFlags;
210 ProgramXferProcessor fXferProcessor; 213 ProgramXferProcessor fXferProcessor;
211 FragmentProcessorArray fFragmentProcessors; 214 FragmentProcessorArray fFragmentProcessors;
212 bool fIgnoresCoverage; 215 bool fIgnoresCoverage;
213 216
214 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 217 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
215 int fNumColorProcessors; 218 int fNumColorProcessors;
216 219
217 typedef SkRefCnt INHERITED; 220 typedef SkRefCnt INHERITED;
218 }; 221 };
219 222
220 #endif 223 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathRendering.cpp ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698