| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrTypesPriv_DEFINED | 8 #ifndef GrTypesPriv_DEFINED |
| 9 #define GrTypesPriv_DEFINED | 9 #define GrTypesPriv_DEFINED |
| 10 | 10 |
| 11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
| 12 #include "SkTArray.h" | 12 #include "SkTArray.h" |
| 13 #include "SkRect.h" |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * Types of shader-language-specific boxed variables we can create. (Currently o
nly GrGLShaderVars, | 16 * Types of shader-language-specific boxed variables we can create. (Currently o
nly GrGLShaderVars, |
| 16 * but should be applicable to other shader languages.) | 17 * but should be applicable to other shader languages.) |
| 17 */ | 18 */ |
| 18 enum GrSLType { | 19 enum GrSLType { |
| 19 kVoid_GrSLType, | 20 kVoid_GrSLType, |
| 20 kFloat_GrSLType, | 21 kFloat_GrSLType, |
| 21 kVec2f_GrSLType, | 22 kVec2f_GrSLType, |
| 22 kVec3f_GrSLType, | 23 kVec3f_GrSLType, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 234 |
| 234 /** | 235 /** |
| 235 * Indicates the type of pending IO operations that can be recorded for gpu reso
urces. | 236 * Indicates the type of pending IO operations that can be recorded for gpu reso
urces. |
| 236 */ | 237 */ |
| 237 enum GrIOType { | 238 enum GrIOType { |
| 238 kRead_GrIOType, | 239 kRead_GrIOType, |
| 239 kWrite_GrIOType, | 240 kWrite_GrIOType, |
| 240 kRW_GrIOType | 241 kRW_GrIOType |
| 241 }; | 242 }; |
| 242 | 243 |
| 244 struct GrScissorState { |
| 245 GrScissorState() : fEnabled(false) {} |
| 246 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } |
| 247 bool operator==(const GrScissorState& other) const { |
| 248 return fEnabled == other.fEnabled && |
| 249 (false == fEnabled || fRect == other.fRect); |
| 250 } |
| 251 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } |
| 252 bool fEnabled; |
| 253 SkIRect fRect; |
| 254 }; |
| 255 |
| 243 #endif | 256 #endif |
| OLD | NEW |