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

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

Issue 1866293003: Decouple contrast boost from fake gamma. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Missed one. Finish renaming to ScalerContextFlags 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
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 "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 } 707 }
708 708
709 // rotated text looks bad with hinting, so we disable it as needed 709 // rotated text looks bad with hinting, so we disable it as needed
710 if (!isAxisAligned(*rec)) { 710 if (!isAxisAligned(*rec)) {
711 h = SkPaint::kNo_Hinting; 711 h = SkPaint::kNo_Hinting;
712 } 712 }
713 rec->setHinting(h); 713 rec->setHinting(h);
714 714
715 #ifndef SK_GAMMA_APPLY_TO_A8 715 #ifndef SK_GAMMA_APPLY_TO_A8
716 if (!isLCD(*rec)) { 716 if (!isLCD(*rec)) {
717 rec->ignorePreBlend(); 717 // SRGBTODO: Is this correct?
bungeman-skia 2016/04/07 20:15:45 Yeah... so by default we don't apply the gamma stu
718 rec->ignorePreBlend(false);
718 } 719 }
719 #endif 720 #endif
720 } 721 }
721 722
722 int SkTypeface_FreeType::onGetUPEM() const { 723 int SkTypeface_FreeType::onGetUPEM() const {
723 AutoFTAccess fta(this); 724 AutoFTAccess fta(this);
724 FT_Face face = fta.face(); 725 FT_Face face = fta.face();
725 return face ? face->units_per_EM : 0; 726 return face ? face->units_per_EM : 0;
726 } 727 }
727 728
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", 1815 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n",
1815 name.c_str(), 1816 name.c_str(),
1816 (skTag >> 24) & 0xFF, 1817 (skTag >> 24) & 0xFF,
1817 (skTag >> 16) & 0xFF, 1818 (skTag >> 16) & 0xFF,
1818 (skTag >> 8) & 0xFF, 1819 (skTag >> 8) & 0xFF,
1819 (skTag) & 0xFF)); 1820 (skTag) & 0xFF));
1820 } 1821 }
1821 } 1822 }
1822 ) 1823 )
1823 } 1824 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698