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 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } | 261 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } |
262 | 262 |
263 bool enabled() const { return fEnabled; } | 263 bool enabled() const { return fEnabled; } |
264 const SkIRect& rect() const { return fRect; } | 264 const SkIRect& rect() const { return fRect; } |
265 | 265 |
266 private: | 266 private: |
267 bool fEnabled; | 267 bool fEnabled; |
268 SkIRect fRect; | 268 SkIRect fRect; |
269 }; | 269 }; |
270 | 270 |
| 271 /** |
| 272 * Indicates the transfer direction for a transfer buffer |
| 273 */ |
| 274 enum TransferType { |
| 275 /** Caller intends to use the buffer to transfer data to the GPU */ |
| 276 kCpuToGpu_TransferType, |
| 277 /** Caller intends to use the buffer to transfer data from the GPU */ |
| 278 kGpuToCpu_TransferType |
| 279 }; |
| 280 |
| 281 |
271 #ifdef SK_DEBUG | 282 #ifdef SK_DEBUG |
272 // Takes a pointer to a GrCaps, and will suppress prints if required | 283 // Takes a pointer to a GrCaps, and will suppress prints if required |
273 #define GrCapsDebugf(caps, ...) \ | 284 #define GrCapsDebugf(caps, ...) \ |
274 if (!caps->suppressPrints()) { \ | 285 if (!caps->suppressPrints()) { \ |
275 SkDebugf(__VA_ARGS__); \ | 286 SkDebugf(__VA_ARGS__); \ |
276 } | 287 } |
277 #else | 288 #else |
278 #define GrCapsDebugf(caps, ...) | 289 #define GrCapsDebugf(caps, ...) |
279 #endif | 290 #endif |
280 | 291 |
281 #endif | 292 #endif |
OLD | NEW |