OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrOptDrawState_DEFINED | 8 #ifndef GrOptDrawState_DEFINED |
9 #define GrOptDrawState_DEFINED | 9 #define GrOptDrawState_DEFINED |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 SkASSERT(idx < this->numCoverageStages()); | 78 SkASSERT(idx < this->numCoverageStages()); |
79 return fFragmentStages[fNumColorStages + idx]; | 79 return fFragmentStages[fNumColorStages + idx]; |
80 } | 80 } |
81 const GrPendingFragmentStage& getFragmentStage(int idx) const { | 81 const GrPendingFragmentStage& getFragmentStage(int idx) const { |
82 return fFragmentStages[idx]; | 82 return fFragmentStages[idx]; |
83 } | 83 } |
84 | 84 |
85 /// @} | 85 /// @} |
86 | 86 |
87 /////////////////////////////////////////////////////////////////////////// | 87 /////////////////////////////////////////////////////////////////////////// |
88 /// @name View Matrix | |
89 //// | |
90 | |
91 /** | |
92 * Retrieves the current view matrix | |
93 * @return the current view matrix. | |
94 */ | |
95 const SkMatrix& getViewMatrix() const { return fViewMatrix; } | |
96 | |
97 /// @} | |
98 | |
99 /////////////////////////////////////////////////////////////////////////// | |
100 /// @name Render Target | 88 /// @name Render Target |
101 //// | 89 //// |
102 | 90 |
103 /** | 91 /** |
104 * Retrieves the currently set render-target. | 92 * Retrieves the currently set render-target. |
105 * | 93 * |
106 * @return The currently set render target. | 94 * @return The currently set render target. |
107 */ | 95 */ |
108 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } | 96 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } |
109 | 97 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 kHWAA_Flag = 0x2, | 167 kHWAA_Flag = 0x2, |
180 }; | 168 }; |
181 | 169 |
182 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; | 170 typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; |
183 typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray; | 171 typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray; |
184 typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryPr
ocessor; | 172 typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryPr
ocessor; |
185 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitive
Processor; | 173 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitive
Processor; |
186 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; | 174 typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; |
187 RenderTarget fRenderTarget; | 175 RenderTarget fRenderTarget; |
188 GrScissorState fScissorState; | 176 GrScissorState fScissorState; |
189 SkMatrix fViewMatrix; | |
190 GrStencilSettings fStencilSettings; | 177 GrStencilSettings fStencilSettings; |
191 GrDrawState::DrawFace fDrawFace; | 178 GrDrawState::DrawFace fDrawFace; |
192 GrDeviceCoordTexture fDstCopy; | 179 GrDeviceCoordTexture fDstCopy; |
193 uint32_t fFlags; | 180 uint32_t fFlags; |
194 ProgramGeometryProcessor fGeometryProcessor; | 181 ProgramGeometryProcessor fGeometryProcessor; |
195 ProgramPrimitiveProcessor fPrimitiveProcessor; | 182 ProgramPrimitiveProcessor fPrimitiveProcessor; |
196 GrBatchTracker fBatchTracker; | 183 GrBatchTracker fBatchTracker; |
197 ProgramXferProcessor fXferProcessor; | 184 ProgramXferProcessor fXferProcessor; |
198 FragmentStageArray fFragmentStages; | 185 FragmentStageArray fFragmentStages; |
199 GrGpu::DrawType fDrawType; | 186 GrGpu::DrawType fDrawType; |
200 GrProgramDesc::DescInfo fDescInfo; | 187 GrProgramDesc::DescInfo fDescInfo; |
201 bool fFinalized; | 188 bool fFinalized; |
202 | 189 |
203 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. | 190 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. |
204 int fNumColorStages; | 191 int fNumColorStages; |
205 | 192 |
206 GrProgramDesc fDesc; | 193 GrProgramDesc fDesc; |
207 | 194 |
208 typedef SkRefCnt INHERITED; | 195 typedef SkRefCnt INHERITED; |
209 }; | 196 }; |
210 | 197 |
211 #endif | 198 #endif |
OLD | NEW |