| 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 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
| 13 #include "GrPendingFragmentStage.h" | 13 #include "GrPendingFragmentStage.h" |
| 14 #include "GrProgramDesc.h" | 14 #include "GrProgramDesc.h" |
| 15 #include "GrStencil.h" | 15 #include "GrStencil.h" |
| 16 #include "GrTypesPriv.h" | 16 #include "GrTypesPriv.h" |
| 17 #include "SkMatrix.h" | 17 #include "SkMatrix.h" |
| 18 #include "SkRefCnt.h" | 18 #include "SkRefCnt.h" |
| 19 | 19 |
| 20 class GrDeviceCoordTexture; | 20 class GrDeviceCoordTexture; |
| 21 class GrDrawState; | 21 class GrDrawState; |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Class that holds an optimized version of a GrDrawState. It is meant to be an
immutable class, | 24 * Class that holds an optimized version of a GrDrawState. It is meant to be an
immutable class, |
| 25 * and contains all data needed to set the state for a gpu draw. | 25 * and contains all data needed to set the state for a gpu draw. |
| 26 */ | 26 */ |
| 27 class GrOptDrawState : public SkRefCnt { | 27 class GrOptDrawState { |
| 28 public: | 28 public: |
| 29 SK_DECLARE_INST_COUNT(GrOptDrawState) | 29 SK_DECLARE_INST_COUNT(GrOptDrawState) |
| 30 | 30 |
| 31 typedef GrClipMaskManager::ScissorState ScissorState; | 31 typedef GrClipMaskManager::ScissorState ScissorState; |
| 32 | 32 |
| 33 GrOptDrawState(const GrDrawState& drawState, GrGpu*, const ScissorState&, | 33 GrOptDrawState(const GrDrawState& drawState, GrGpu*, const ScissorState&, |
| 34 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType); | 34 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType); |
| 35 | 35 |
| 36 bool operator== (const GrOptDrawState& that) const; | 36 bool operator== (const GrOptDrawState& that) const; |
| 37 bool operator!= (const GrOptDrawState& that) const { return !(*this == that)
; } | 37 bool operator!= (const GrOptDrawState& that) const { return !(*this == that)
; } |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 int fNumColorStages; | 273 int fNumColorStages; |
| 274 | 274 |
| 275 SkAutoSTArray<4, GrVertexAttrib> fOptVA; | 275 SkAutoSTArray<4, GrVertexAttrib> fOptVA; |
| 276 | 276 |
| 277 GrProgramDesc fDesc; | 277 GrProgramDesc fDesc; |
| 278 | 278 |
| 279 typedef SkRefCnt INHERITED; | 279 typedef SkRefCnt INHERITED; |
| 280 }; | 280 }; |
| 281 | 281 |
| 282 #endif | 282 #endif |
| OLD | NEW |