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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 * Gets whether the target is drawing clockwise, counterclockwise, | 189 * Gets whether the target is drawing clockwise, counterclockwise, |
190 * or both faces. | 190 * or both faces. |
191 * @return the current draw face(s). | 191 * @return the current draw face(s). |
192 */ | 192 */ |
193 GrDrawState::DrawFace getDrawFace() const { return fDrawFace; } | 193 GrDrawState::DrawFace getDrawFace() const { return fDrawFace; } |
194 | 194 |
195 /// @} | 195 /// @} |
196 | 196 |
197 /////////////////////////////////////////////////////////////////////////// | 197 /////////////////////////////////////////////////////////////////////////// |
198 | 198 |
| 199 const GrDeviceCoordTexture* getDstCopy() const { return fDstCopy.texture() ?
&fDstCopy : NULL; } |
199 | 200 |
200 const GrProgramDesc& programDesc() const { return fDesc; } | 201 const GrProgramDesc& programDesc() const { return fDesc; } |
201 | 202 |
202 private: | 203 private: |
203 /** | 204 /** |
204 * Constructs and optimized drawState out of a GrRODrawState. | 205 * Constructs and optimized drawState out of a GrRODrawState. |
205 */ | 206 */ |
206 GrOptDrawState(const GrDrawState& drawState, GrDrawState::BlendOpt, | 207 GrOptDrawState(const GrDrawState& drawState, GrDrawState::BlendOpt, |
207 GrBlendCoeff optSrcCoeff, GrBlendCoeff optDstCoeff, | 208 GrBlendCoeff optSrcCoeff, GrBlendCoeff optDstCoeff, |
208 GrGpu*, const ScissorState&, const GrDeviceCoordTexture* dstC
opy, | 209 GrGpu*, const ScissorState&, const GrDeviceCoordTexture* dstC
opy, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 ScissorState fScissorState; | 269 ScissorState fScissorState; |
269 GrColor fColor; | 270 GrColor fColor; |
270 SkMatrix fViewMatrix; | 271 SkMatrix fViewMatrix; |
271 GrColor fBlendConstant; | 272 GrColor fBlendConstant; |
272 const GrVertexAttrib* fVAPtr; | 273 const GrVertexAttrib* fVAPtr; |
273 int fVACount; | 274 int fVACount; |
274 size_t fVAStride; | 275 size_t fVAStride; |
275 GrStencilSettings fStencilSettings; | 276 GrStencilSettings fStencilSettings; |
276 uint8_t fCoverage; | 277 uint8_t fCoverage; |
277 GrDrawState::DrawFace fDrawFace; | 278 GrDrawState::DrawFace fDrawFace; |
| 279 GrDeviceCoordTexture fDstCopy; |
278 GrBlendCoeff fSrcBlend; | 280 GrBlendCoeff fSrcBlend; |
279 GrBlendCoeff fDstBlend; | 281 GrBlendCoeff fDstBlend; |
280 uint32_t fFlags; | 282 uint32_t fFlags; |
281 ProgramGeometryProcessor fGeometryProcessor; | 283 ProgramGeometryProcessor fGeometryProcessor; |
282 FragmentStageArray fFragmentStages; | 284 FragmentStageArray fFragmentStages; |
283 | 285 |
284 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. | 286 // This function is equivalent to the offset into fFragmentStages where cove
rage stages begin. |
285 int fNumColorStages; | 287 int fNumColorStages; |
286 | 288 |
287 SkAutoSTArray<4, GrVertexAttrib> fOptVA; | 289 SkAutoSTArray<4, GrVertexAttrib> fOptVA; |
288 | 290 |
289 GrProgramDesc fDesc; | 291 GrProgramDesc fDesc; |
290 | 292 |
291 typedef SkRefCnt INHERITED; | 293 typedef SkRefCnt INHERITED; |
292 }; | 294 }; |
293 | 295 |
294 #endif | 296 #endif |
OLD | NEW |