| 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 |
| 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 "GrPipelineBuilder.h" | |
| 17 #include "GrPrimitiveProcessor.h" | 16 #include "GrPrimitiveProcessor.h" |
| 18 #include "GrProcOptInfo.h" | 17 #include "GrProcOptInfo.h" |
| 19 #include "GrProgramDesc.h" | 18 #include "GrProgramDesc.h" |
| 20 #include "GrStencilSettings.h" | 19 #include "GrStencilSettings.h" |
| 21 #include "GrTypesPriv.h" | 20 #include "GrTypesPriv.h" |
| 22 #include "SkMatrix.h" | 21 #include "SkMatrix.h" |
| 23 #include "SkRefCnt.h" | 22 #include "SkRefCnt.h" |
| 24 | 23 |
| 24 #include "effects/GrCoverageSetOpXP.h" |
| 25 #include "effects/GrDisableColorXP.h" |
| 26 #include "effects/GrPorterDuffXferProcessor.h" |
| 27 #include "effects/GrSimpleTextureEffect.h" |
| 28 |
| 25 class GrBatch; | 29 class GrBatch; |
| 26 class GrDrawContext; | 30 class GrDrawContext; |
| 27 class GrDeviceCoordTexture; | 31 class GrDeviceCoordTexture; |
| 28 class GrPipelineBuilder; | 32 class GrPipelineBuilder; |
| 29 | 33 |
| 30 struct GrBatchToXPOverrides { | 34 struct GrBatchToXPOverrides { |
| 31 GrBatchToXPOverrides() | 35 GrBatchToXPOverrides() |
| 32 : fUsePLSDstRead(false) {} | 36 : fUsePLSDstRead(false) {} |
| 33 | 37 |
| 34 bool fUsePLSDstRead; | 38 bool fUsePLSDstRead; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 166 |
| 163 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { | 167 GrXferBarrierType xferBarrierType(const GrCaps& caps) const { |
| 164 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap
s); | 168 return this->getXferProcessor().xferBarrierType(fRenderTarget.get(), cap
s); |
| 165 } | 169 } |
| 166 | 170 |
| 167 /** | 171 /** |
| 168 * Gets whether the target is drawing clockwise, counterclockwise, | 172 * Gets whether the target is drawing clockwise, counterclockwise, |
| 169 * or both faces. | 173 * or both faces. |
| 170 * @return the current draw face(s). | 174 * @return the current draw face(s). |
| 171 */ | 175 */ |
| 172 GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; } | 176 GrDrawFace getDrawFace() const { return fDrawFace; } |
| 173 | 177 |
| 174 | 178 |
| 175 /////////////////////////////////////////////////////////////////////////// | 179 /////////////////////////////////////////////////////////////////////////// |
| 176 | 180 |
| 177 bool ignoresCoverage() const { return fIgnoresCoverage; } | 181 bool ignoresCoverage() const { return fIgnoresCoverage; } |
| 178 | 182 |
| 179 private: | 183 private: |
| 180 GrPipeline() { /** Initialized in factory function*/ } | 184 GrPipeline() { /** Initialized in factory function*/ } |
| 181 | 185 |
| 182 /** | 186 /** |
| (...skipping 22 matching lines...) Expand all Loading... |
| 205 kHasStencilClip_Flag = 0x10 | 209 kHasStencilClip_Flag = 0x10 |
| 206 }; | 210 }; |
| 207 | 211 |
| 208 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; | 212 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; |
| 209 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr
ocessor; | 213 typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentPr
ocessor; |
| 210 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; | 214 typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; |
| 211 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; | 215 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; |
| 212 RenderTarget fRenderTarget; | 216 RenderTarget fRenderTarget; |
| 213 GrScissorState fScissorState; | 217 GrScissorState fScissorState; |
| 214 GrStencilSettings fStencilSettings; | 218 GrStencilSettings fStencilSettings; |
| 215 GrPipelineBuilder::DrawFace fDrawFace; | 219 GrDrawFace fDrawFace; |
| 216 uint32_t fFlags; | 220 uint32_t fFlags; |
| 217 ProgramXferProcessor fXferProcessor; | 221 ProgramXferProcessor fXferProcessor; |
| 218 FragmentProcessorArray fFragmentProcessors; | 222 FragmentProcessorArray fFragmentProcessors; |
| 219 bool fIgnoresCoverage; | 223 bool fIgnoresCoverage; |
| 220 | 224 |
| 221 // This value is also the index in fFragmentProcessors where coverage proces
sors begin. | 225 // This value is also the index in fFragmentProcessors where coverage proces
sors begin. |
| 222 int fNumColorProcessors; | 226 int fNumColorProcessors; |
| 223 | 227 |
| 224 typedef SkRefCnt INHERITED; | 228 typedef SkRefCnt INHERITED; |
| 225 }; | 229 }; |
| 226 | 230 |
| 227 #endif | 231 #endif |
| OLD | NEW |