Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 1866293003: Decouple contrast boost from fake gamma. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve ignorePreBlend API, add storage type to enum Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698