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 "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 | 1689 |
1690 #ifdef SK_GAMMA_CONTRAST | 1690 #ifdef SK_GAMMA_CONTRAST |
1691 rec->setContrast(SK_GAMMA_CONTRAST); | 1691 rec->setContrast(SK_GAMMA_CONTRAST); |
1692 #else | 1692 #else |
1693 /** | 1693 /** |
1694 * A value of 0.5 for SK_GAMMA_CONTRAST appears to be a good compromise. | 1694 * A value of 0.5 for SK_GAMMA_CONTRAST appears to be a good compromise. |
1695 * With lower values small text appears washed out (though correctly so). | 1695 * With lower values small text appears washed out (though correctly so). |
1696 * With higher values lcd fringing is worse and the smoothing effect of | 1696 * With higher values lcd fringing is worse and the smoothing effect of |
1697 * partial coverage is diminished. | 1697 * partial coverage is diminished. |
1698 */ | 1698 */ |
1699 rec->setContrast(SkFloatToScalar(0.5f)); | 1699 rec->setContrast(0.5f); |
1700 #endif | 1700 #endif |
1701 | 1701 |
1702 rec->fReservedAlign = 0; | 1702 rec->fReservedAlign = 0; |
1703 | 1703 |
1704 /* Allow the fonthost to modify our rec before we use it as a key into the | 1704 /* Allow the fonthost to modify our rec before we use it as a key into the |
1705 cache. This way if we're asking for something that they will ignore, | 1705 cache. This way if we're asking for something that they will ignore, |
1706 they can modify our rec up front, so we don't create duplicate cache | 1706 they can modify our rec up front, so we don't create duplicate cache |
1707 entries. | 1707 entries. |
1708 */ | 1708 */ |
1709 typeface->onFilterRec(rec); | 1709 typeface->onFilterRec(rec); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 case SkXfermode::kPlus_Mode: | 2601 case SkXfermode::kPlus_Mode: |
2602 return 0 == this->getAlpha(); | 2602 return 0 == this->getAlpha(); |
2603 case SkXfermode::kDst_Mode: | 2603 case SkXfermode::kDst_Mode: |
2604 return true; | 2604 return true; |
2605 default: | 2605 default: |
2606 break; | 2606 break; |
2607 } | 2607 } |
2608 } | 2608 } |
2609 return false; | 2609 return false; |
2610 } | 2610 } |
OLD | NEW |