| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 #include "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
| 10 #include "SkBase64.h" | 10 #include "SkBase64.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 ////////////////////////////////////////////////////////////////////////////////
//////// | 1060 ////////////////////////////////////////////////////////////////////////////////
//////// |
| 1061 | 1061 |
| 1062 #define SK_SHOW_TEXT_BLIT_COVERAGE 0 | 1062 #define SK_SHOW_TEXT_BLIT_COVERAGE 0 |
| 1063 | 1063 |
| 1064 static void build_power_table(uint8_t table[], float ee) { | 1064 static void build_power_table(uint8_t table[], float ee) { |
| 1065 for (int i = 0; i < 256; i++) { | 1065 for (int i = 0; i < 256; i++) { |
| 1066 float x = i / 255.f; | 1066 float x = i / 255.f; |
| 1067 x = sk_float_pow(x, ee); | 1067 x = sk_float_pow(x, ee); |
| 1068 int xx = SkScalarRound(SkFloatToScalar(x * 255)); | 1068 int xx = SkScalarRound(x * 255); |
| 1069 table[i] = SkToU8(xx); | 1069 table[i] = SkToU8(xx); |
| 1070 } | 1070 } |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 /** | 1073 /** |
| 1074 * This will invert the gamma applied by GDI (gray-scale antialiased), so we | 1074 * This will invert the gamma applied by GDI (gray-scale antialiased), so we |
| 1075 * can get linear values. | 1075 * can get linear values. |
| 1076 * | 1076 * |
| 1077 * GDI grayscale appears to use a hard-coded gamma of 2.3. | 1077 * GDI grayscale appears to use a hard-coded gamma of 2.3. |
| 1078 * | 1078 * |
| (...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 | 2600 |
| 2601 private: | 2601 private: |
| 2602 SkTDArray<ENUMLOGFONTEX> fLogFontArray; | 2602 SkTDArray<ENUMLOGFONTEX> fLogFontArray; |
| 2603 }; | 2603 }; |
| 2604 | 2604 |
| 2605 /////////////////////////////////////////////////////////////////////////////// | 2605 /////////////////////////////////////////////////////////////////////////////// |
| 2606 | 2606 |
| 2607 SkFontMgr* SkFontMgr_New_GDI() { | 2607 SkFontMgr* SkFontMgr_New_GDI() { |
| 2608 return SkNEW(SkFontMgrGDI); | 2608 return SkNEW(SkFontMgrGDI); |
| 2609 } | 2609 } |
| OLD | NEW |