OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 /** | 53 /** |
54 * Resets to the default state. GrEffects will be removed from all stages. | 54 * Resets to the default state. GrEffects will be removed from all stages. |
55 */ | 55 */ |
56 void reset() { this->onReset(NULL); } | 56 void reset() { this->onReset(NULL); } |
57 | 57 |
58 void reset(const SkMatrix& initialViewMatrix) { this->onReset(&initialViewMa
trix); } | 58 void reset(const SkMatrix& initialViewMatrix) { this->onReset(&initialViewMa
trix); } |
59 | 59 |
60 /** | 60 /** |
61 * Initializes the GrDrawState based on a GrPaint, view matrix and render ta
rget. Note that | 61 * Initializes the GrDrawState based on a GrPaint, view matrix and render ta
rget. Note that |
62 * GrDrawState encompasses more than GrPaint. Aspects of GrDrawState that ha
ve no GrPaint | 62 * GrDrawState encompasses more than GrPaint. Aspects of GrDrawState that ha
ve no GrPaint |
63 * equivalents are set to default values. Clipping will be enabled. | 63 * equivalents are set to default values with the exception of vertex attrib
ute state which |
| 64 * is unmodified by this function and clipping which will be enabled. |
64 */ | 65 */ |
65 void setFromPaint(const GrPaint& , const SkMatrix& viewMatrix, GrRenderTarge
t*); | 66 void setFromPaint(const GrPaint& , const SkMatrix& viewMatrix, GrRenderTarge
t*); |
66 | 67 |
67 /////////////////////////////////////////////////////////////////////////// | 68 /////////////////////////////////////////////////////////////////////////// |
68 /// @name Vertex Attributes | 69 /// @name Vertex Attributes |
69 //// | 70 //// |
70 | 71 |
71 enum { | 72 enum { |
72 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, | 73 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, |
73 }; | 74 }; |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 840 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
840 */ | 841 */ |
841 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 842 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
842 | 843 |
843 typedef SkRefCnt INHERITED; | 844 typedef SkRefCnt INHERITED; |
844 }; | 845 }; |
845 | 846 |
846 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 847 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
847 | 848 |
848 #endif | 849 #endif |
OLD | NEW |