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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 *text = (const char*)ptr; | 917 *text = (const char*)ptr; |
918 return cache->getUnicharMetrics(uni); | 918 return cache->getUnicharMetrics(uni); |
919 } | 919 } |
920 | 920 |
921 static const SkGlyph& sk_getMetrics_utf32_xy(SkGlyphCache* cache, | 921 static const SkGlyph& sk_getMetrics_utf32_xy(SkGlyphCache* cache, |
922 const char** text, SkFixed x, SkFixed y) { | 922 const char** text, SkFixed x, SkFixed y) { |
923 SkASSERT(cache != NULL); | 923 SkASSERT(cache != NULL); |
924 SkASSERT(text != NULL); | 924 SkASSERT(text != NULL); |
925 | 925 |
926 const int32_t* ptr = *(const int32_t**)text; | 926 const int32_t* ptr = *(const int32_t**)text; |
927 SkUnichar uni = *--ptr; | 927 SkUnichar uni = *ptr++; |
928 *text = (const char*)ptr; | 928 *text = (const char*)ptr; |
929 return cache->getUnicharMetrics(uni, x, y); | 929 return cache->getUnicharMetrics(uni, x, y); |
930 } | 930 } |
931 | 931 |
932 static const SkGlyph& sk_getMetrics_glyph_00(SkGlyphCache* cache, | 932 static const SkGlyph& sk_getMetrics_glyph_00(SkGlyphCache* cache, |
933 const char** text, SkFixed, SkFixed) { | 933 const char** text, SkFixed, SkFixed) { |
934 SkASSERT(cache != NULL); | 934 SkASSERT(cache != NULL); |
935 SkASSERT(text != NULL); | 935 SkASSERT(text != NULL); |
936 | 936 |
937 const uint16_t* ptr = *(const uint16_t**)text; | 937 const uint16_t* ptr = *(const uint16_t**)text; |
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2736 } | 2736 } |
2737 #ifdef SK_BUILD_FOR_ANDROID | 2737 #ifdef SK_BUILD_FOR_ANDROID |
2738 if (dirty & kPaintOptionsAndroid_DirtyBit) { | 2738 if (dirty & kPaintOptionsAndroid_DirtyBit) { |
2739 SkPaintOptionsAndroid options; | 2739 SkPaintOptionsAndroid options; |
2740 options.unflatten(buffer); | 2740 options.unflatten(buffer); |
2741 paint->setPaintOptionsAndroid(options); | 2741 paint->setPaintOptionsAndroid(options); |
2742 } | 2742 } |
2743 #endif | 2743 #endif |
2744 SkASSERT(dirty == paint->fDirtyBits); | 2744 SkASSERT(dirty == paint->fDirtyBits); |
2745 } | 2745 } |
OLD | NEW |