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

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

Issue 14972022: Make the use of fallback fonts in Android a runtime decision. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | « include/core/SkPaintOptionsAndroid.h ('k') | src/ports/SkFontHost_android.cpp » ('j') | 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 2012 The Android Open Source Project 3 * Copyright 2012 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 #ifdef SK_BUILD_FOR_ANDROID 9 #ifdef SK_BUILD_FOR_ANDROID
10 10
(...skipping 12 matching lines...) Expand all
23 if (parentTagEnd == NULL) { 23 if (parentTagEnd == NULL) {
24 return SkLanguage(); 24 return SkLanguage();
25 } 25 }
26 size_t parentTagLen = parentTagEnd - tag; 26 size_t parentTagLen = parentTagEnd - tag;
27 return SkLanguage(tag, parentTagLen); 27 return SkLanguage(tag, parentTagLen);
28 } 28 }
29 29
30 void SkPaintOptionsAndroid::flatten(SkFlattenableWriteBuffer& buffer) const { 30 void SkPaintOptionsAndroid::flatten(SkFlattenableWriteBuffer& buffer) const {
31 buffer.writeUInt(fFontVariant); 31 buffer.writeUInt(fFontVariant);
32 buffer.writeString(fLanguage.getTag().c_str()); 32 buffer.writeString(fLanguage.getTag().c_str());
33 buffer.writeBool(fUseFontFallbacks);
33 } 34 }
34 35
35 void SkPaintOptionsAndroid::unflatten(SkFlattenableReadBuffer& buffer) { 36 void SkPaintOptionsAndroid::unflatten(SkFlattenableReadBuffer& buffer) {
36 fFontVariant = (FontVariant)buffer.readUInt(); 37 fFontVariant = (FontVariant)buffer.readUInt();
37 char* tag = buffer.readString(); 38 char* tag = buffer.readString();
38 fLanguage = SkLanguage(tag); 39 fLanguage = SkLanguage(tag);
39 sk_free(tag); 40 sk_free(tag);
41 fUseFontFallbacks = buffer.readBool();
40 } 42 }
41 43
42 #endif 44 #endif
OLDNEW
« no previous file with comments | « include/core/SkPaintOptionsAndroid.h ('k') | src/ports/SkFontHost_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698