OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 #include "SkTypes.h" // Keep this before any #ifdef ... | 8 #include "SkTypes.h" // Keep this before any #ifdef ... |
9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 9 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
10 | 10 |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 // Fonts may mix outlines and bitmaps, so information is needed on a glyph b
y glyph basis. | 2023 // Fonts may mix outlines and bitmaps, so information is needed on a glyph b
y glyph basis. |
2024 // If a font contains an 'sbix' table, consider it to be a color font, and d
isable lcd. | 2024 // If a font contains an 'sbix' table, consider it to be a color font, and d
isable lcd. |
2025 if (fHasColorGlyphs) { | 2025 if (fHasColorGlyphs) { |
2026 rec->fMaskFormat = SkMask::kARGB32_Format; | 2026 rec->fMaskFormat = SkMask::kARGB32_Format; |
2027 } | 2027 } |
2028 | 2028 |
2029 // Unhinted A8 masks (those not derived from LCD masks) must respect SK_GAMM
A_APPLY_TO_A8. | 2029 // Unhinted A8 masks (those not derived from LCD masks) must respect SK_GAMM
A_APPLY_TO_A8. |
2030 // All other masks can use regular gamma. | 2030 // All other masks can use regular gamma. |
2031 if (SkMask::kA8_Format == rec->fMaskFormat && SkPaint::kNo_Hinting == hintin
g) { | 2031 if (SkMask::kA8_Format == rec->fMaskFormat && SkPaint::kNo_Hinting == hintin
g) { |
2032 #ifndef SK_GAMMA_APPLY_TO_A8 | 2032 #ifndef SK_GAMMA_APPLY_TO_A8 |
| 2033 // SRGBTODO: Is this correct? Do we want contrast boost? |
2033 rec->ignorePreBlend(); | 2034 rec->ignorePreBlend(); |
2034 #endif | 2035 #endif |
2035 } else { | 2036 } else { |
2036 //CoreGraphics dialates smoothed text as needed. | 2037 //CoreGraphics dialates smoothed text as needed. |
2037 rec->setContrast(0); | 2038 rec->setContrast(0); |
2038 } | 2039 } |
2039 } | 2040 } |
2040 | 2041 |
2041 // we take ownership of the ref | 2042 // we take ownership of the ref |
2042 static const char* get_str(CFStringRef ref, SkString* str) { | 2043 static const char* get_str(CFStringRef ref, SkString* str) { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 } | 2625 } |
2625 return face; | 2626 return face; |
2626 } | 2627 } |
2627 }; | 2628 }; |
2628 | 2629 |
2629 /////////////////////////////////////////////////////////////////////////////// | 2630 /////////////////////////////////////////////////////////////////////////////// |
2630 | 2631 |
2631 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; } | 2632 SkFontMgr* SkFontMgr::Factory() { return new SkFontMgr_Mac; } |
2632 | 2633 |
2633 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 2634 #endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
OLD | NEW |