| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 */ | 284 */ |
| 285 kBGRA_8888_GrPixelConfig, | 285 kBGRA_8888_GrPixelConfig, |
| 286 | 286 |
| 287 kGrPixelConfigCount | 287 kGrPixelConfigCount |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 // Aliases for pixel configs that match skia's byte order. | 290 // Aliases for pixel configs that match skia's byte order. |
| 291 #ifndef SK_CPU_LENDIAN | 291 #ifndef SK_CPU_LENDIAN |
| 292 #error "Skia gpu currently assumes little endian" | 292 #error "Skia gpu currently assumes little endian" |
| 293 #endif | 293 #endif |
| 294 #if 24 == SK_A32_SHIFT && 16 == SK_R32_SHIFT && \ | 294 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) |
| 295 8 == SK_G32_SHIFT && 0 == SK_B32_SHIFT | |
| 296 static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfi
g; | 295 static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfi
g; |
| 297 #elif 24 == SK_A32_SHIFT && 16 == SK_B32_SHIFT && \ | 296 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) |
| 298 8 == SK_G32_SHIFT && 0 == SK_R32_SHIFT | |
| 299 static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfi
g; | 297 static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfi
g; |
| 300 #else | 298 #else |
| 301 #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." | 299 #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." |
| 302 #endif | 300 #endif |
| 303 | 301 |
| 304 // Returns true if the pixel config is 32 bits per pixel | 302 // Returns true if the pixel config is 32 bits per pixel |
| 305 static inline bool GrPixelConfigIs8888(GrPixelConfig config) { | 303 static inline bool GrPixelConfigIs8888(GrPixelConfig config) { |
| 306 switch (config) { | 304 switch (config) { |
| 307 case kRGBA_8888_GrPixelConfig: | 305 case kRGBA_8888_GrPixelConfig: |
| 308 case kBGRA_8888_GrPixelConfig: | 306 case kBGRA_8888_GrPixelConfig: |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 /** | 623 /** |
| 626 * Handle to the 3D API object. | 624 * Handle to the 3D API object. |
| 627 * OpenGL: FBO ID | 625 * OpenGL: FBO ID |
| 628 */ | 626 */ |
| 629 GrBackendObject fRenderTargetHandle; | 627 GrBackendObject fRenderTargetHandle; |
| 630 }; | 628 }; |
| 631 | 629 |
| 632 /////////////////////////////////////////////////////////////////////////////// | 630 /////////////////////////////////////////////////////////////////////////////// |
| 633 | 631 |
| 634 #endif | 632 #endif |
| OLD | NEW |