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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
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 #include "SkTypes.h" 13 #include "SkTypes.h"
14 #include "SkString.h" 14 #include "SkString.h"
15 15
16 class SkFlattenableReadBuffer; 16 class SkReadBuffer;
17 class SkFlattenableWriteBuffer; 17 class SkWriteBuffer;
18 18
19 /** \class SkLanguage 19 /** \class SkLanguage
20 20
21 The SkLanguage class represents a human written language, and is used by 21 The SkLanguage class represents a human written language, and is used by
22 text draw operations to determine which glyph to draw when drawing 22 text draw operations to determine which glyph to draw when drawing
23 characters with variants (ie Han-derived characters). 23 characters with variants (ie Han-derived characters).
24 */ 24 */
25 class SkLanguage { 25 class SkLanguage {
26 public: 26 public:
27 SkLanguage() { } 27 SkLanguage() { }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool operator==(const SkPaintOptionsAndroid& b) const { 73 bool operator==(const SkPaintOptionsAndroid& b) const {
74 return !(*this != b); 74 return !(*this != b);
75 } 75 }
76 76
77 bool operator!=(const SkPaintOptionsAndroid& b) const { 77 bool operator!=(const SkPaintOptionsAndroid& b) const {
78 return fLanguage != b.fLanguage || 78 return fLanguage != b.fLanguage ||
79 fFontVariant != b.fFontVariant || 79 fFontVariant != b.fFontVariant ||
80 fUseFontFallbacks != b.fUseFontFallbacks; 80 fUseFontFallbacks != b.fUseFontFallbacks;
81 } 81 }
82 82
83 void flatten(SkFlattenableWriteBuffer&) const; 83 void flatten(SkWriteBuffer&) const;
84 void unflatten(SkFlattenableReadBuffer&); 84 void unflatten(SkReadBuffer&);
85 85
86 /** Return the paint's language value used for drawing text. 86 /** Return the paint's language value used for drawing text.
87 @return the paint's language value used for drawing text. 87 @return the paint's language value used for drawing text.
88 */ 88 */
89 const SkLanguage& getLanguage() const { return fLanguage; } 89 const SkLanguage& getLanguage() const { return fLanguage; }
90 90
91 /** Set the paint's language value used for drawing text. 91 /** Set the paint's language value used for drawing text.
92 @param language set the paint's language value for drawing text. 92 @param language set the paint's language value for drawing text.
93 */ 93 */
94 void setLanguage(const SkLanguage& language) { fLanguage = language; } 94 void setLanguage(const SkLanguage& language) { fLanguage = language; }
(...skipping 26 matching lines...) Expand all
121 fUseFontFallbacks = useFontFallbacks; 121 fUseFontFallbacks = useFontFallbacks;
122 } 122 }
123 123
124 private: 124 private:
125 SkLanguage fLanguage; 125 SkLanguage fLanguage;
126 FontVariant fFontVariant; 126 FontVariant fFontVariant;
127 bool fUseFontFallbacks; 127 bool fUseFontFallbacks;
128 }; 128 };
129 129
130 #endif // #ifndef SkPaintOptionsAndroid_DEFINED 130 #endif // #ifndef SkPaintOptionsAndroid_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698