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

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

Issue 24075010: We don't flatten or unflatten SkPaintOptionsAndroid. Reproduce and fix. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync to head Created 7 years, 2 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 | « gyp/tests.gyp ('k') | src/core/SkPaint.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 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 #ifdef SK_BUILD_FOR_ANDROID
17
18 class SkFlattenableReadBuffer; 16 class SkFlattenableReadBuffer;
19 class SkFlattenableWriteBuffer; 17 class SkFlattenableWriteBuffer;
20 18
21 /** \class SkLanguage 19 /** \class SkLanguage
22 20
23 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
24 text draw operations to determine which glyph to draw when drawing 22 text draw operations to determine which glyph to draw when drawing
25 characters with variants (ie Han-derived characters). 23 characters with variants (ie Han-derived characters).
26 */ 24 */
27 class SkLanguage { 25 class SkLanguage {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 fUseFontFallbacks = false; 63 fUseFontFallbacks = false;
66 } 64 }
67 65
68 SkPaintOptionsAndroid& operator=(const SkPaintOptionsAndroid& b) { 66 SkPaintOptionsAndroid& operator=(const SkPaintOptionsAndroid& b) {
69 fLanguage = b.fLanguage; 67 fLanguage = b.fLanguage;
70 fFontVariant = b.fFontVariant; 68 fFontVariant = b.fFontVariant;
71 fUseFontFallbacks = b.fUseFontFallbacks; 69 fUseFontFallbacks = b.fUseFontFallbacks;
72 return *this; 70 return *this;
73 } 71 }
74 72
73 bool operator==(const SkPaintOptionsAndroid& b) const {
74 return !(*this != b);
75 }
76
75 bool operator!=(const SkPaintOptionsAndroid& b) const { 77 bool operator!=(const SkPaintOptionsAndroid& b) const {
76 return fLanguage != b.fLanguage || 78 return fLanguage != b.fLanguage ||
77 fFontVariant != b.fFontVariant || 79 fFontVariant != b.fFontVariant ||
78 fUseFontFallbacks != b.fUseFontFallbacks; 80 fUseFontFallbacks != b.fUseFontFallbacks;
79 } 81 }
80 82
81 void flatten(SkFlattenableWriteBuffer&) const; 83 void flatten(SkFlattenableWriteBuffer&) const;
82 void unflatten(SkFlattenableReadBuffer&); 84 void unflatten(SkFlattenableReadBuffer&);
83 85
84 /** Return the paint's language value used for drawing text. 86 /** Return the paint's language value used for drawing text.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void setUseFontFallbacks(bool useFontFallbacks) { 120 void setUseFontFallbacks(bool useFontFallbacks) {
119 fUseFontFallbacks = useFontFallbacks; 121 fUseFontFallbacks = useFontFallbacks;
120 } 122 }
121 123
122 private: 124 private:
123 SkLanguage fLanguage; 125 SkLanguage fLanguage;
124 FontVariant fFontVariant; 126 FontVariant fFontVariant;
125 bool fUseFontFallbacks; 127 bool fUseFontFallbacks;
126 }; 128 };
127 129
128 #endif // #ifdef SK_BUILD_FOR_ANDROID
129 #endif // #ifndef SkPaintOptionsAndroid_DEFINED 130 #endif // #ifndef SkPaintOptionsAndroid_DEFINED
OLDNEW
« no previous file with comments | « gyp/tests.gyp ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698