OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/proxy/serialized_structs.h" | 5 #include "ppapi/proxy/serialized_structs.h" |
6 | 6 |
7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ppapi/c/dev/ppb_font_dev.h" | 9 #include "ppapi/c/dev/ppb_font_dev.h" |
10 #include "ppapi/c/pp_file_info.h" | 10 #include "ppapi/c/pp_file_info.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 desc->face = StringVar::StringToPPVar(face); | 73 desc->face = StringVar::StringToPPVar(face); |
74 desc->family = static_cast<PP_BrowserFont_Trusted_Family>(family); | 74 desc->family = static_cast<PP_BrowserFont_Trusted_Family>(family); |
75 desc->size = size; | 75 desc->size = size; |
76 desc->weight = static_cast<PP_BrowserFont_Trusted_Weight>(weight); | 76 desc->weight = static_cast<PP_BrowserFont_Trusted_Weight>(weight); |
77 desc->italic = italic; | 77 desc->italic = italic; |
78 desc->small_caps = small_caps; | 78 desc->small_caps = small_caps; |
79 desc->letter_spacing = letter_spacing; | 79 desc->letter_spacing = letter_spacing; |
80 desc->word_spacing = word_spacing; | 80 desc->word_spacing = word_spacing; |
81 } | 81 } |
82 | 82 |
| 83 SerializedTrueTypeFontDesc::SerializedTrueTypeFontDesc() |
| 84 : family(), |
| 85 generic_family(), |
| 86 style(), |
| 87 weight(), |
| 88 width(), |
| 89 charset() { |
| 90 } |
| 91 |
| 92 SerializedTrueTypeFontDesc::~SerializedTrueTypeFontDesc() {} |
| 93 |
| 94 void SerializedTrueTypeFontDesc::SetFromPPTrueTypeFontDesc( |
| 95 const PP_TrueTypeFontDesc_Dev& desc) { |
| 96 StringVar* string_var = StringVar::FromPPVar(desc.family); |
| 97 family = string_var ? string_var->value() : std::string(); |
| 98 |
| 99 generic_family = desc.generic_family; |
| 100 style = desc.style; |
| 101 weight = desc.weight; |
| 102 width = desc.width; |
| 103 charset = desc.charset; |
| 104 } |
| 105 |
| 106 void SerializedTrueTypeFontDesc::CopyToPPTrueTypeFontDesc( |
| 107 PP_TrueTypeFontDesc_Dev* desc) const { |
| 108 desc->family = StringVar::StringToPPVar(family); |
| 109 |
| 110 desc->generic_family = generic_family; |
| 111 desc->style = style; |
| 112 desc->weight = weight; |
| 113 desc->width = width; |
| 114 desc->charset = charset; |
| 115 } |
| 116 |
83 PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params() | 117 PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params() |
84 : instance(0), | 118 : instance(0), |
85 font_desc(), | 119 font_desc(), |
86 color(0) { | 120 color(0) { |
87 clip.point.x = 0; | 121 clip.point.x = 0; |
88 clip.point.y = 0; | 122 clip.point.y = 0; |
89 clip.size.height = 0; | 123 clip.size.height = 0; |
90 clip.size.width = 0; | 124 clip.size.width = 0; |
91 position.x = 0; | 125 position.x = 0; |
92 position.y = 0; | 126 position.y = 0; |
93 allow_subpixel_aa = PP_FALSE; | 127 allow_subpixel_aa = PP_FALSE; |
94 } | 128 } |
95 | 129 |
96 PPBFlash_DrawGlyphs_Params::~PPBFlash_DrawGlyphs_Params() {} | 130 PPBFlash_DrawGlyphs_Params::~PPBFlash_DrawGlyphs_Params() {} |
97 | 131 |
98 } // namespace proxy | 132 } // namespace proxy |
99 } // namespace ppapi | 133 } // namespace ppapi |
OLD | NEW |