| 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 12 matching lines...) Expand all Loading... |
| 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 : public SkRefCnt { |
| 28 public: | 28 public: |
| 29 /** | 29 /** |
| 30 * Returns a snapshot of the current optimized state. The GrOptDrawState is
reffed and ownership | 30 * Returns a snapshot of the current optimized state. The GrOptDrawState is
reffed and ownership |
| 31 * is given to the caller. | 31 * is given to the caller. |
| 32 */ | 32 */ |
| 33 static GrOptDrawState* Create(const GrDrawState& drawState, GrGpu*, | 33 static GrOptDrawState* Create(const GrDrawState& drawState, |
| 34 const GrDeviceCoordTexture* dstCopy, GrGpu::Dr
awType drawType); | 34 GrGpu*, |
| 35 const GrDeviceCoordTexture* dstCopy, |
| 36 GrGpu::DrawType drawType); |
| 35 | 37 |
| 36 bool operator== (const GrOptDrawState& that) const; | 38 bool operator== (const GrOptDrawState& that) const; |
| 37 | 39 |
| 38 /////////////////////////////////////////////////////////////////////////// | 40 /////////////////////////////////////////////////////////////////////////// |
| 39 /// @name Vertex Attributes | 41 /// @name Vertex Attributes |
| 40 //// | 42 //// |
| 41 | 43 |
| 42 enum { | 44 enum { |
| 43 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, | 45 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, |
| 44 }; | 46 }; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 390 |
| 389 GrProgramDesc fDesc; | 391 GrProgramDesc fDesc; |
| 390 | 392 |
| 391 typedef SkRefCnt INHERITED; | 393 typedef SkRefCnt INHERITED; |
| 392 }; | 394 }; |
| 393 | 395 |
| 394 GR_MAKE_BITFIELD_OPS(GrOptDrawState::BlendOptFlags); | 396 GR_MAKE_BITFIELD_OPS(GrOptDrawState::BlendOptFlags); |
| 395 | 397 |
| 396 #endif | 398 #endif |
| 397 | 399 |
| OLD | NEW |