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

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

Issue 2251573002: Implement difference clip rects with window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: return type Created 4 years, 4 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
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrFragmentProcessor.h" 12 #include "GrFragmentProcessor.h"
13 #include "GrGpu.h" 13 #include "GrGpu.h"
14 #include "GrNonAtomicRef.h" 14 #include "GrNonAtomicRef.h"
15 #include "GrPendingProgramElement.h" 15 #include "GrPendingProgramElement.h"
16 #include "GrPrimitiveProcessor.h" 16 #include "GrPrimitiveProcessor.h"
17 #include "GrProcOptInfo.h" 17 #include "GrProcOptInfo.h"
18 #include "GrProgramDesc.h" 18 #include "GrProgramDesc.h"
19 #include "GrStencilSettings.h" 19 #include "GrStencilSettings.h"
20 #include "GrTypesPriv.h" 20 #include "GrTypesPriv.h"
21 #include "GrWindowRectangles.h"
21 #include "SkMatrix.h" 22 #include "SkMatrix.h"
22 #include "SkRefCnt.h" 23 #include "SkRefCnt.h"
23 24
24 #include "effects/GrCoverageSetOpXP.h" 25 #include "effects/GrCoverageSetOpXP.h"
25 #include "effects/GrDisableColorXP.h" 26 #include "effects/GrDisableColorXP.h"
26 #include "effects/GrPorterDuffXferProcessor.h" 27 #include "effects/GrPorterDuffXferProcessor.h"
27 #include "effects/GrSimpleTextureEffect.h" 28 #include "effects/GrSimpleTextureEffect.h"
28 29
29 class GrBatch; 30 class GrBatch;
30 class GrDrawContext; 31 class GrDrawContext;
(...skipping 21 matching lines...) Expand all
52 public: 53 public:
53 /////////////////////////////////////////////////////////////////////////// 54 ///////////////////////////////////////////////////////////////////////////
54 /// @name Creation 55 /// @name Creation
55 56
56 struct CreateArgs { 57 struct CreateArgs {
57 const GrPipelineBuilder* fPipelineBuilder; 58 const GrPipelineBuilder* fPipelineBuilder;
58 GrDrawContext* fDrawContext; 59 GrDrawContext* fDrawContext;
59 const GrCaps* fCaps; 60 const GrCaps* fCaps;
60 GrPipelineOptimizations fOpts; 61 GrPipelineOptimizations fOpts;
61 const GrScissorState* fScissor; 62 const GrScissorState* fScissor;
63 const GrWindowRectangles* fWindowRects;
62 bool fHasStencilClip; 64 bool fHasStencilClip;
63 GrXferProcessor::DstTexture fDstTexture; 65 GrXferProcessor::DstTexture fDstTexture;
64 }; 66 };
65 67
66 /** Creates a pipeline into a pre-allocated buffer */ 68 /** Creates a pipeline into a pre-allocated buffer */
67 static GrPipeline* CreateAt(void* memory, const CreateArgs&, GrXPOverridesFo rBatch*); 69 static GrPipeline* CreateAt(void* memory, const CreateArgs&, GrXPOverridesFo rBatch*);
68 70
69 /// @} 71 /// @}
70 72
71 /////////////////////////////////////////////////////////////////////////// 73 ///////////////////////////////////////////////////////////////////////////
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 * Retrieves the currently set render-target. 147 * Retrieves the currently set render-target.
146 * 148 *
147 * @return The currently set render target. 149 * @return The currently set render target.
148 */ 150 */
149 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } 151 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); }
150 152
151 const GrStencilSettings& getStencil() const { return fStencilSettings; } 153 const GrStencilSettings& getStencil() const { return fStencilSettings; }
152 154
153 const GrScissorState& getScissorState() const { return fScissorState; } 155 const GrScissorState& getScissorState() const { return fScissorState; }
154 156
157 const GrWindowRectangles& getWindowRectangles() const { return fWindowRects; }
158
155 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 159 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
156 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 160 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
157 bool getDisableOutputConversionToSRGB() const { 161 bool getDisableOutputConversionToSRGB() const {
158 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 162 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
159 } 163 }
160 bool getAllowSRGBInputs() const { 164 bool getAllowSRGBInputs() const {
161 return SkToBool(fFlags & kAllowSRGBInputs_Flag); 165 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
162 } 166 }
163 bool usesDistanceVectorField() const { 167 bool usesDistanceVectorField() const {
164 return SkToBool(fFlags & kUsesDistanceVectorField_Flag); 168 return SkToBool(fFlags & kUsesDistanceVectorField_Flag);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 kUsesDistanceVectorField_Flag = 0x10, 216 kUsesDistanceVectorField_Flag = 0x10,
213 kHasStencilClip_Flag = 0x20, 217 kHasStencilClip_Flag = 0x20,
214 }; 218 };
215 219
216 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 220 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
217 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 221 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
218 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 222 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
219 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 223 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
220 RenderTarget fRenderTarget; 224 RenderTarget fRenderTarget;
221 GrScissorState fScissorState; 225 GrScissorState fScissorState;
226 GrWindowRectangles fWindowRects;
222 GrStencilSettings fStencilSettings; 227 GrStencilSettings fStencilSettings;
223 GrDrawFace fDrawFace; 228 GrDrawFace fDrawFace;
224 uint32_t fFlags; 229 uint32_t fFlags;
225 ProgramXferProcessor fXferProcessor; 230 ProgramXferProcessor fXferProcessor;
226 FragmentProcessorArray fFragmentProcessors; 231 FragmentProcessorArray fFragmentProcessors;
227 bool fIgnoresCoverage; 232 bool fIgnoresCoverage;
228 233
229 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 234 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
230 int fNumColorProcessors; 235 int fNumColorProcessors;
231 236
232 typedef SkRefCnt INHERITED; 237 typedef SkRefCnt INHERITED;
233 }; 238 };
234 239
235 #endif 240 #endif
OLDNEW
« src/gpu/GrCaps.cpp ('K') | « src/gpu/GrNonAtomicRef.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698