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

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

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

Powered by Google App Engine
This is Rietveld 408576698