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 | 8 |
9 #include "SkGr.h" | 9 #include "SkGr.h" |
10 #include "SkGrPriv.h" | 10 #include "SkGrPriv.h" |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 break; | 501 break; |
502 default: | 502 default: |
503 return false; | 503 return false; |
504 } | 504 } |
505 if (ctOut) { | 505 if (ctOut) { |
506 *ctOut = ct; | 506 *ctOut = ct; |
507 } | 507 } |
508 return true; | 508 return true; |
509 } | 509 } |
510 | 510 |
511 GrPixelConfig GrRenderableConfigForColorSpace(SkColorSpace* colorSpace) { | 511 GrPixelConfig GrRenderableConfigForColorSpace(const SkColorSpace* colorSpace) { |
512 if (!colorSpace) { | 512 if (!colorSpace) { |
513 return kRGBA_8888_GrPixelConfig; | 513 return kRGBA_8888_GrPixelConfig; |
514 } else if (colorSpace->gammaIsLinear()) { | 514 } else if (colorSpace->gammaIsLinear()) { |
515 return kRGBA_half_GrPixelConfig; | 515 return kRGBA_half_GrPixelConfig; |
516 } else if (colorSpace->gammaCloseToSRGB()) { | 516 } else if (colorSpace->gammaCloseToSRGB()) { |
517 return kSRGBA_8888_GrPixelConfig; | 517 return kSRGBA_8888_GrPixelConfig; |
518 } else { | 518 } else { |
519 SkDEBUGFAIL("No renderable config exists for color space with strange ga
mma"); | 519 SkDEBUGFAIL("No renderable config exists for color space with strange ga
mma"); |
520 return kUnknown_GrPixelConfig; | 520 return kUnknown_GrPixelConfig; |
521 } | 521 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 SkErrorInternals::SetError( kInvalidPaint_SkError, | 787 SkErrorInternals::SetError( kInvalidPaint_SkError, |
788 "Sorry, I don't understand the filtering
" | 788 "Sorry, I don't understand the filtering
" |
789 "mode you asked for. Falling back to " | 789 "mode you asked for. Falling back to " |
790 "MIPMaps."); | 790 "MIPMaps."); |
791 textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 791 textureFilterMode = GrTextureParams::kMipMap_FilterMode; |
792 break; | 792 break; |
793 | 793 |
794 } | 794 } |
795 return textureFilterMode; | 795 return textureFilterMode; |
796 } | 796 } |
OLD | NEW |