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

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: 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
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 fFontVariant = fontVariant; 109 fFontVariant = fontVariant;
109 } 110 }
110 111
111 private: 112 private:
112 SkLanguage fLanguage; 113 SkLanguage fLanguage;
113 FontVariant fFontVariant; 114 FontVariant fFontVariant;
114 }; 115 };
115 116
116 #endif // #ifdef SK_BUILD_FOR_ANDROID 117 #endif // #ifdef SK_BUILD_FOR_ANDROID
117 #endif // #ifndef SkPaintOptionsAndroid_DEFINED 118 #endif // #ifndef SkPaintOptionsAndroid_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698