| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 392         case kLATC_GrPixelConfig: | 392         case kLATC_GrPixelConfig: | 
| 393         case kASTC_12x12_GrPixelConfig: | 393         case kASTC_12x12_GrPixelConfig: | 
| 394         case kAlpha_8_GrPixelConfig: | 394         case kAlpha_8_GrPixelConfig: | 
| 395         case kAlpha_half_GrPixelConfig: | 395         case kAlpha_half_GrPixelConfig: | 
| 396             return true; | 396             return true; | 
| 397         default: | 397         default: | 
| 398             return false; | 398             return false; | 
| 399     } | 399     } | 
| 400 } | 400 } | 
| 401 | 401 | 
| 402 static inline bool GrAllowSRGBForDestinationPixelConfig(GrPixelConfig config) { |  | 
| 403     switch (config) { |  | 
| 404         case kRGBA_8888_GrPixelConfig: |  | 
| 405         case kBGRA_8888_GrPixelConfig: |  | 
| 406             return false; |  | 
| 407         default: |  | 
| 408             return true; |  | 
| 409     } |  | 
| 410 } |  | 
| 411 |  | 
| 412 /** | 402 /** | 
| 413  * Optional bitfield flags that can be set on GrSurfaceDesc (below). | 403  * Optional bitfield flags that can be set on GrSurfaceDesc (below). | 
| 414  */ | 404  */ | 
| 415 enum GrSurfaceFlags { | 405 enum GrSurfaceFlags { | 
| 416     kNone_GrSurfaceFlags            = 0x0, | 406     kNone_GrSurfaceFlags            = 0x0, | 
| 417     /** | 407     /** | 
| 418      * Creates a texture that can be rendered to as a GrRenderTarget. Use | 408      * Creates a texture that can be rendered to as a GrRenderTarget. Use | 
| 419      * GrTexture::asRenderTarget() to access. | 409      * GrTexture::asRenderTarget() to access. | 
| 420      */ | 410      */ | 
| 421     kRenderTarget_GrSurfaceFlag     = 0x1, | 411     kRenderTarget_GrSurfaceFlag     = 0x1, | 
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 707             return 4 * width * height; | 697             return 4 * width * height; | 
| 708     } | 698     } | 
| 709 } | 699 } | 
| 710 | 700 | 
| 711 /** | 701 /** | 
| 712  * This value translates to reseting all the context state for any backend. | 702  * This value translates to reseting all the context state for any backend. | 
| 713  */ | 703  */ | 
| 714 static const uint32_t kAll_GrBackendState = 0xffffffff; | 704 static const uint32_t kAll_GrBackendState = 0xffffffff; | 
| 715 | 705 | 
| 716 #endif | 706 #endif | 
| OLD | NEW | 
|---|