OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrTypes_DEFINED | 8 #ifndef GrTypes_DEFINED |
9 #define GrTypes_DEFINED | 9 #define GrTypes_DEFINED |
10 | 10 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 case kLATC_GrPixelConfig: | 378 case kLATC_GrPixelConfig: |
379 case kASTC_12x12_GrPixelConfig: | 379 case kASTC_12x12_GrPixelConfig: |
380 case kAlpha_8_GrPixelConfig: | 380 case kAlpha_8_GrPixelConfig: |
381 case kAlpha_half_GrPixelConfig: | 381 case kAlpha_half_GrPixelConfig: |
382 return true; | 382 return true; |
383 default: | 383 default: |
384 return false; | 384 return false; |
385 } | 385 } |
386 } | 386 } |
387 | 387 |
| 388 static inline bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) { |
| 389 switch (config) { |
| 390 case kRGBA_float_GrPixelConfig: |
| 391 case kAlpha_half_GrPixelConfig: |
| 392 case kRGBA_half_GrPixelConfig: |
| 393 return true; |
| 394 default: |
| 395 return false; |
| 396 } |
| 397 } |
| 398 |
388 /** | 399 /** |
389 * Optional bitfield flags that can be set on GrSurfaceDesc (below). | 400 * Optional bitfield flags that can be set on GrSurfaceDesc (below). |
390 */ | 401 */ |
391 enum GrSurfaceFlags { | 402 enum GrSurfaceFlags { |
392 kNone_GrSurfaceFlags = 0x0, | 403 kNone_GrSurfaceFlags = 0x0, |
393 /** | 404 /** |
394 * Creates a texture that can be rendered to as a GrRenderTarget. Use | 405 * Creates a texture that can be rendered to as a GrRenderTarget. Use |
395 * GrTexture::asRenderTarget() to access. | 406 * GrTexture::asRenderTarget() to access. |
396 */ | 407 */ |
397 kRenderTarget_GrSurfaceFlag = 0x1, | 408 kRenderTarget_GrSurfaceFlag = 0x1, |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 return 4 * width * height; | 635 return 4 * width * height; |
625 } | 636 } |
626 } | 637 } |
627 | 638 |
628 /** | 639 /** |
629 * This value translates to reseting all the context state for any backend. | 640 * This value translates to reseting all the context state for any backend. |
630 */ | 641 */ |
631 static const uint32_t kAll_GrBackendState = 0xffffffff; | 642 static const uint32_t kAll_GrBackendState = 0xffffffff; |
632 | 643 |
633 #endif | 644 #endif |
OLD | NEW |