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

Side by Side Diff: include/core/SkPaintOptionsAndroid.h

Issue 15179008: Add buffer helper to read directly into SkString to avoid extra copying (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebasing 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/SkFlattenableBuffers.h ('k') | src/core/SkOrderedReadBuffer.h » ('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 9
10 #ifndef SkPaintOptionsAndroid_DEFINED 10 #ifndef SkPaintOptionsAndroid_DEFINED
11 #define SkPaintOptionsAndroid_DEFINED 11 #define SkPaintOptionsAndroid_DEFINED
12 12
13 #ifdef SK_BUILD_FOR_ANDROID 13 #ifdef SK_BUILD_FOR_ANDROID
14 14
15 #include "SkString.h" 15 #include "SkString.h"
16 #include "SkTypes.h" 16 #include "SkTypes.h"
17 17
18 class SkFlattenableReadBuffer; 18 class SkFlattenableReadBuffer;
19 class SkFlattenableWriteBuffer; 19 class SkFlattenableWriteBuffer;
20 20
21 /** \class SkLanguage 21 /** \class SkLanguage
22 22
23 The SkLanguage class represents a human written language, and is used by 23 The SkLanguage class represents a human written language, and is used by
24 text draw operations to determine which glyph to draw when drawing 24 text draw operations to determine which glyph to draw when drawing
25 characters with variants (ie Han-derived characters). 25 characters with variants (ie Han-derived characters).
26 */ 26 */
27 class SkLanguage { 27 class SkLanguage {
28 public: 28 public:
29 SkLanguage() { } 29 SkLanguage() { }
30 SkLanguage(const SkString& tag) : fTag(tag) { }
30 SkLanguage(const char* tag) : fTag(tag) { } 31 SkLanguage(const char* tag) : fTag(tag) { }
31 SkLanguage(const char* tag, size_t len) : fTag(tag, len) { } 32 SkLanguage(const char* tag, size_t len) : fTag(tag, len) { }
32 SkLanguage(const SkLanguage& b) : fTag(b.fTag) { } 33 SkLanguage(const SkLanguage& b) : fTag(b.fTag) { }
33 34
34 /** Gets a BCP 47 language identifier for this SkLanguage. 35 /** Gets a BCP 47 language identifier for this SkLanguage.
35 @return a BCP 47 language identifier representing this language 36 @return a BCP 47 language identifier representing this language
36 */ 37 */
37 const SkString& getTag() const { return fTag; } 38 const SkString& getTag() const { return fTag; }
38 39
39 /** Performs BCP 47 fallback to return an SkLanguage one step more general. 40 /** Performs BCP 47 fallback to return an SkLanguage one step more general.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 120 }
120 121
121 private: 122 private:
122 SkLanguage fLanguage; 123 SkLanguage fLanguage;
123 FontVariant fFontVariant; 124 FontVariant fFontVariant;
124 bool fUseFontFallbacks; 125 bool fUseFontFallbacks;
125 }; 126 };
126 127
127 #endif // #ifdef SK_BUILD_FOR_ANDROID 128 #endif // #ifdef SK_BUILD_FOR_ANDROID
128 #endif // #ifndef SkPaintOptionsAndroid_DEFINED 129 #endif // #ifndef SkPaintOptionsAndroid_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkFlattenableBuffers.h ('k') | src/core/SkOrderedReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698