| OLD | NEW |
| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 * @return The currently set render target. | 138 * @return The currently set render target. |
| 139 */ | 139 */ |
| 140 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } | 140 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } |
| 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 { |
| 149 return SkToBool(fFlags & kDisableOutputConversionToSRGB_Flag); |
| 150 } |
| 148 | 151 |
| 149 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { | 152 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { |
| 150 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap
s); | 153 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap
s); |
| 151 } | 154 } |
| 152 | 155 |
| 153 /** | 156 /** |
| 154 * Gets whether the target is drawing clockwise, counterclockwise, | 157 * Gets whether the target is drawing clockwise, counterclockwise, |
| 155 * or both faces. | 158 * or both faces. |
| 156 * @return the current draw face(s). | 159 * @return the current draw face(s). |
| 157 */ | 160 */ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 177 | 180 |
| 178 /** | 181 /** |
| 179 * Calculates the primary and secondary output types of the shader. For cert
ain output types | 182 * Calculates the primary and secondary output types of the shader. For cert
ain output types |
| 180 * the function may adjust the blend coefficients. After this function is ca
lled the src and dst | 183 * the function may adjust the blend coefficients. After this function is ca
lled the src and dst |
| 181 * blend coeffs will represent those used by backend API. | 184 * blend coeffs will represent those used by backend API. |
| 182 */ | 185 */ |
| 183 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla
gs, | 186 void setOutputStateInfo(const GrPipelineBuilder& ds, GrXferProcessor::OptFla
gs, |
| 184 const GrCaps&); | 187 const GrCaps&); |
| 185 | 188 |
| 186 enum Flags { | 189 enum Flags { |
| 187 kHWAA_Flag = 0x1, | 190 kHWAA_Flag = 0x1, |
| 188 kSnapVertices_Flag = 0x2, | 191 kSnapVertices_Flag = 0x2, |
| 192 kDisableOutputConversionToSRGB_Flag = 0x4, |
| 189 }; | 193 }; |
| 190 | 194 |
| 191 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; | 195 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; |
| 192 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr
ocessor; | 196 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr
ocessor; |
| 193 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; | 197 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; |
| 194 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; | 198 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; |
| 195 RenderTarget fRenderTarget; | 199 RenderTarget fRenderTarget; |
| 196 GrScissorState fScissorState; | 200 GrScissorState fScissorState; |
| 197 GrStencilSettings fStencilSettings; | 201 GrStencilSettings fStencilSettings; |
| 198 GrPipelineBuilder::DrawFace fDrawFace; | 202 GrPipelineBuilder::DrawFace fDrawFace; |
| 199 uint32_t fFlags; | 203 uint32_t fFlags; |
| 200 ProgramXferProcessor fXferProcessor; | 204 ProgramXferProcessor fXferProcessor; |
| 201 FragmentProcessorArray fFragmentProcessors; | 205 FragmentProcessorArray fFragmentProcessors; |
| 202 bool fIgnoresCoverage; | 206 bool fIgnoresCoverage; |
| 203 | 207 |
| 204 // This value is also the index in fFragmentProcessors where coverage proces
sors begin. | 208 // This value is also the index in fFragmentProcessors where coverage proces
sors begin. |
| 205 int fNumColorProcessors; | 209 int fNumColorProcessors; |
| 206 | 210 |
| 207 typedef SkRefCnt INHERITED; | 211 typedef SkRefCnt INHERITED; |
| 208 }; | 212 }; |
| 209 | 213 |
| 210 #endif | 214 #endif |
| OLD | NEW |