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

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

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 const GrStencilSettings& getStencil() const { return fStencilSettings; } 142 const GrStencilSettings& getStencil() const { return fStencilSettings; }
143 143
144 const GrScissorState& getScissorState() const { return fScissorState; } 144 const GrScissorState& getScissorState() const { return fScissorState; }
145 145
146 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); } 146 bool isHWAntialiasState() const { return SkToBool(fFlags & kHWAA_Flag); }
147 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); } 147 bool snapVerticesToPixelCenters() const { return SkToBool(fFlags & kSnapVert ices_Flag); }
148 bool getDisableOutputConversionToSRGB() const { 148 bool getDisableOutputConversionToSRGB() const {
149 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); 149 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag);
150 } 150 }
151 bool getAllowSRGBInputs() const {
152 return SkToBool(fFlags & kAllowSRGBInputs_Flag);
153 }
151 154
152 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { 155 GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
153 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s); 156 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap s);
154 } 157 }
155 158
156 /** 159 /**
157 * Gets whether the target is drawing clockwise, counterclockwise, 160 * Gets whether the target is drawing clockwise, counterclockwise,
158 * or both faces. 161 * or both faces.
159 * @return the current draw face(s). 162 * @return the current draw face(s).
160 */ 163 */
(...skipping 22 matching lines...) Expand all
183 * the function may adjust the blend coefficients. After this function is ca lled the src and dst 186 * the function may adjust the blend coefficients. After this function is ca lled the src and dst
184 * blend coeffs will represent those used by backend API. 187 * blend coeffs will represent those used by backend API.
185 */ 188 */
186 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs, 189 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla gs,
187 const GrCaps&); 190 const GrCaps&);
188 191
189 enum Flags { 192 enum Flags {
190 kHWAA_Flag = 0x1, 193 kHWAA_Flag = 0x1,
191 kSnapVertices_Flag = 0x2, 194 kSnapVertices_Flag = 0x2,
192 kDisableOutputConversionToSRGB_Flag = 0x4, 195 kDisableOutputConversionToSRGB_Flag = 0x4,
196 kAllowSRGBInputs_Flag = 0x8,
193 }; 197 };
194 198
195 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; 199 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
196 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor; 200 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr ocessor;
197 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; 201 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
198 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; 202 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
199 RenderTarget fRenderTarget; 203 RenderTarget fRenderTarget;
200 GrScissorState fScissorState; 204 GrScissorState fScissorState;
201 GrStencilSettings fStencilSettings; 205 GrStencilSettings fStencilSettings;
202 GrPipelineBuilder::DrawFace fDrawFace; 206 GrPipelineBuilder::DrawFace fDrawFace;
203 uint32_t fFlags; 207 uint32_t fFlags;
204 ProgramXferProcessor fXferProcessor; 208 ProgramXferProcessor fXferProcessor;
205 FragmentProcessorArray fFragmentProcessors; 209 FragmentProcessorArray fFragmentProcessors;
206 bool fIgnoresCoverage; 210 bool fIgnoresCoverage;
207 211
208 // This value is also the index in fFragmentProcessors where coverage proces sors begin. 212 // This value is also the index in fFragmentProcessors where coverage proces sors begin.
209 int fNumColorProcessors; 213 int fNumColorProcessors;
210 214
211 typedef SkRefCnt INHERITED; 215 typedef SkRefCnt INHERITED;
212 }; 216 };
213 217
214 #endif 218 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698