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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 * Resets to the default state. GrEffects will be removed from all stages. | 87 * Resets to the default state. GrEffects will be removed from all stages. |
88 */ | 88 */ |
89 void reset() { this->onReset(NULL); } | 89 void reset() { this->onReset(NULL); } |
90 | 90 |
91 void reset(const SkMatrix& initialViewMatrix) { this->onReset(&initialViewMa
trix); } | 91 void reset(const SkMatrix& initialViewMatrix) { this->onReset(&initialViewMa
trix); } |
92 | 92 |
93 /** | 93 /** |
94 * Initializes the GrDrawState based on a GrPaint, view matrix and render ta
rget. Note that | 94 * Initializes the GrDrawState based on a GrPaint, view matrix and render ta
rget. Note that |
95 * GrDrawState encompasses more than GrPaint. Aspects of GrDrawState that ha
ve no GrPaint | 95 * GrDrawState encompasses more than GrPaint. Aspects of GrDrawState that ha
ve no GrPaint |
96 * equivalents are set to default values. GrPaint has fewer stages than GrDr
awState. The extra | 96 * equivalents are set to default values. GrPaint has fewer stages than GrDr
awState. The extra |
97 * GrDrawState stages are disabled. | 97 * GrDrawState stages are disabled. Clipping will be enabled. |
98 */ | 98 */ |
99 void setFromPaint(const GrPaint& , const SkMatrix& viewMatrix, GrRenderTarge
t*); | 99 void setFromPaint(const GrPaint& , const SkMatrix& viewMatrix, GrRenderTarge
t*); |
100 | 100 |
101 /////////////////////////////////////////////////////////////////////////// | 101 /////////////////////////////////////////////////////////////////////////// |
102 /// @name Vertex Attributes | 102 /// @name Vertex Attributes |
103 //// | 103 //// |
104 | 104 |
105 enum { | 105 enum { |
106 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, | 106 kMaxVertexAttribCnt = kLast_GrVertexAttribBinding + 4, |
107 }; | 107 }; |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. | 1090 * @param count the number of attributes being set, limited to kMaxVer
texAttribCnt. |
1091 */ | 1091 */ |
1092 void setVertexAttribs(const GrVertexAttrib attribs[], int count); | 1092 void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
1093 | 1093 |
1094 typedef GrRefCnt INHERITED; | 1094 typedef GrRefCnt INHERITED; |
1095 }; | 1095 }; |
1096 | 1096 |
1097 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); | 1097 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); |
1098 | 1098 |
1099 #endif | 1099 #endif |
OLD | NEW |