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

Unified Diff: ppapi/proxy/serialized_structs.cc

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/serialized_structs.cc
diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc
index ebd7ed01c0e86d75754938f08581f35359b01ff7..b3f772e9302e92947d4e187645355d7e9a89b6ab 100644
--- a/ppapi/proxy/serialized_structs.cc
+++ b/ppapi/proxy/serialized_structs.cc
@@ -80,6 +80,40 @@ void SerializedFontDescription::SetToPPBrowserFontDescription(
desc->word_spacing = word_spacing;
}
+SerializedTrueTypeFontDesc::SerializedTrueTypeFontDesc()
+ : family(),
+ generic_family(),
+ style(),
+ weight(),
+ width(),
+ charset() {
+}
+
+SerializedTrueTypeFontDesc::~SerializedTrueTypeFontDesc() {}
+
+void SerializedTrueTypeFontDesc::SetFromPPTrueTypeFontDesc(
+ const PP_TrueTypeFontDesc_Dev& desc) {
+ StringVar* string_var = StringVar::FromPPVar(desc.family);
+ family = string_var ? string_var->value() : std::string();
+
+ generic_family = desc.generic_family;
+ style = desc.style;
+ weight = desc.weight;
+ width = desc.width;
+ charset = desc.charset;
+}
+
+void SerializedTrueTypeFontDesc::SetToPPTrueTypeFontDesc(
dmichael (off chromium) 2013/03/12 18:07:58 I assume anything that starts with "Set" is modify
bbudge 2013/03/13 01:26:50 Done.
+ PP_TrueTypeFontDesc_Dev* desc) const {
+ desc->family = StringVar::StringToPPVar(family);
+
+ desc->generic_family = generic_family;
+ desc->style = style;
+ desc->weight = weight;
+ desc->width = width;
+ desc->charset = charset;
+}
+
PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params()
: instance(0),
font_desc(),

Powered by Google App Engine
This is Rietveld 408576698