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

Side by Side Diff: src/core/SkPaint.cpp

Issue 290893003: fix utf32 text in subpixel mode (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 /* 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698