| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 bool enabled() const { return fEnabled; } | 395 bool enabled() const { return fEnabled; } |
| 396 const SkIRect& rect() const { return fRect; } | 396 const SkIRect& rect() const { return fRect; } |
| 397 | 397 |
| 398 private: | 398 private: |
| 399 bool fEnabled; | 399 bool fEnabled; |
| 400 SkIRect fRect; | 400 SkIRect fRect; |
| 401 }; | 401 }; |
| 402 | 402 |
| 403 /** | 403 /** |
| 404 * Indicates the type of data that a GPU buffer will be used for. | 404 * Indicates the transfer direction for a transfer buffer |
| 405 */ | 405 */ |
| 406 enum GrBufferType { | 406 enum TransferType { |
| 407 kVertex_GrBufferType, | 407 /** Caller intends to use the buffer to transfer data to the GPU */ |
| 408 kIndex_GrBufferType, | 408 kCpuToGpu_TransferType, |
| 409 kXferCpuToGpu_GrBufferType, | 409 /** Caller intends to use the buffer to transfer data from the GPU */ |
| 410 kXferGpuToCpu_GrBufferType, | 410 kGpuToCpu_TransferType |
| 411 | |
| 412 kLast_GrBufferType = kXferGpuToCpu_GrBufferType | |
| 413 }; | |
| 414 | |
| 415 /** | |
| 416 * Provides a performance hint regarding the frequency at which a data store will
be accessed. | |
| 417 */ | |
| 418 enum GrAccessPattern { | |
| 419 /** Data store will be respecified repeatedly and used many times. */ | |
| 420 kDynamic_GrAccessPattern, | |
| 421 /** Data store will be specified once and used many times. (Thus disqualifie
d from caching.) */ | |
| 422 kStatic_GrAccessPattern, | |
| 423 /** Data store will be specified once and used at most a few times. (Also ca
n't be cached.) */ | |
| 424 kStream_GrAccessPattern, | |
| 425 | |
| 426 kLast_GrAccessPattern = kStream_GrAccessPattern | |
| 427 }; | 411 }; |
| 428 | 412 |
| 429 | 413 |
| 430 #ifdef SK_DEBUG | 414 #ifdef SK_DEBUG |
| 431 // Takes a pointer to a GrCaps, and will suppress prints if required | 415 // Takes a pointer to a GrCaps, and will suppress prints if required |
| 432 #define GrCapsDebugf(caps, ...) \ | 416 #define GrCapsDebugf(caps, ...) \ |
| 433 if (!caps->suppressPrints()) { \ | 417 if (!caps->suppressPrints()) { \ |
| 434 SkDebugf(__VA_ARGS__); \ | 418 SkDebugf(__VA_ARGS__); \ |
| 435 } | 419 } |
| 436 #else | 420 #else |
| 437 #define GrCapsDebugf(caps, ...) | 421 #define GrCapsDebugf(caps, ...) |
| 438 #endif | 422 #endif |
| 439 | 423 |
| 440 #endif | 424 #endif |
| OLD | NEW |