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 1359833004: Stop supporting HW dither (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 5 years, 2 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/GrPaint.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * Retrieves the currently set render-target. 113 * Retrieves the currently set render-target.
114 * 114 *
115 * @return The currently set render target. 115 * @return The currently set render target.
116 */ 116 */
117 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } 117 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); }
118 118
119 const GrStencilSettings& getStencil() const { return fStencilSettings; } 119 const GrStencilSettings& getStencil() const { return fStencilSettings; }
120 120
121 const GrScissorState& getScissorState() const { return fScissorState; } 121 const GrScissorState& getScissorState() const { return fScissorState; }
122 122
123 bool isDitherState() const { return SkToBool(fFlags & kDither_Flag); }
124 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 123 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
125 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 124 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
126 125
127 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 126 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
128 return fXferProcessor->xferBarrierType(fRenderTarget.get(), caps); 127 return fXferProcessor->xferBarrierType(fRenderTarget.get(), caps);
129 } 128 }
130 129
131 /** 130 /**
132 * Gets whether the target is drawing clockwise, counterclockwise, 131 * Gets whether the target is drawing clockwise, counterclockwise,
133 * or both faces. 132 * or both faces.
(...skipping 21 matching lines...) Expand all
155 154
156 /** 155 /**
157 * Calculates the primary and secondary output types of the shader. For cert ain output types 156 * Calculates the primary and secondary output types of the shader. For cert ain output types
158 * the function may adjust the blend coefficients. After this function is ca lled the src and dst 157 * the function may adjust the blend coefficients. After this function is ca lled the src and dst
159 * blend coeffs will represent those used by backend API. 158 * blend coeffs will represent those used by backend API.
160 */ 159 */
161 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 160 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
162 const GrCaps&); 161 const GrCaps&);
163 162
164 enum Flags { 163 enum Flags {
165 kDither_Flag = 0x1, 164 kHWAA_Flag = 0x1,
166 kHWAA_Flag = 0x2, 165 kSnapVertices_Flag = 0x2,
167 kSnapVertices_Flag = 0x4,
168 }; 166 };
169 167
170 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 168 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
171 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 169 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
172 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 170 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
173 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 171 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
174 RenderTarget fRenderTarget; 172 RenderTarget fRenderTarget;
175 GrScissorState fScissorState; 173 GrScissorState fScissorState;
176 GrStencilSettings fStencilSettings; 174 GrStencilSettings fStencilSettings;
177 GrPipelineBuilder::DrawFace fDrawFace; 175 GrPipelineBuilder::DrawFace fDrawFace;
178 uint32_t fFlags; 176 uint32_t fFlags;
179 ProgramXferProcessor fXferProcessor; 177 ProgramXferProcessor fXferProcessor;
180 FragmentProcessorArray fFragmentProcessors; 178 FragmentProcessorArray fFragmentProcessors;
181 bool fReadsFragPosition; 179 bool fReadsFragPosition;
182 180
183 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 181 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
184 int fNumColorProcessors; 182 int fNumColorProcessors;
185 183
186 typedef SkRefCnt INHERITED; 184 typedef SkRefCnt INHERITED;
187 }; 185 };
188 186
189 #endif 187 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698