OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 5 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_point.h" | 12 #include "ppapi/c/pp_point.h" |
13 #include "ppapi/c/pp_rect.h" | 13 #include "ppapi/c/pp_rect.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/proxy/serialized_var.h" | 15 #include "ppapi/proxy/serialized_var.h" |
16 | 16 |
17 struct PP_FontDescription_Dev; | 17 struct PP_FontDescription_Dev; |
18 | 18 |
19 namespace pp { | 19 namespace pp { |
20 namespace proxy { | 20 namespace proxy { |
21 | 21 |
22 class Dispatcher; | 22 class Dispatcher; |
23 | 23 |
24 // PP_FontDescript_Dev has to be redefined with a SerializedVar in place of | 24 // PP_FontDescript_Dev has to be redefined with a SerializedVar in place of |
25 // the PP_Var used for the face name. | 25 // the PP_Var used for the face name. |
26 struct SerializedFontDescription { | 26 struct SerializedFontDescription { |
| 27 SerializedFontDescription(); |
| 28 ~SerializedFontDescription(); |
| 29 |
27 // Converts a PP_FontDescription_Dev to a SerializedFontDescription. | 30 // Converts a PP_FontDescription_Dev to a SerializedFontDescription. |
28 // | 31 // |
29 // If source_owns_ref is true, the reference owned by the | 32 // If source_owns_ref is true, the reference owned by the |
30 // PP_FontDescription_Dev will be unchanged and the caller is responsible for | 33 // PP_FontDescription_Dev will be unchanged and the caller is responsible for |
31 // freeing it. When false, the SerializedFontDescription will take ownership | 34 // freeing it. When false, the SerializedFontDescription will take ownership |
32 // of the ref. This is the difference between serializing as an input value | 35 // of the ref. This is the difference between serializing as an input value |
33 // (owns_ref = true) and an output value (owns_ref = true). | 36 // (owns_ref = true) and an output value (owns_ref = true). |
34 void SetFromPPFontDescription(Dispatcher* dispatcher, | 37 void SetFromPPFontDescription(Dispatcher* dispatcher, |
35 const PP_FontDescription_Dev& desc, | 38 const PP_FontDescription_Dev& desc, |
36 bool source_owns_ref); | 39 bool source_owns_ref); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 PP_Bool text_is_rtl; | 76 PP_Bool text_is_rtl; |
74 PP_Bool override_direction; | 77 PP_Bool override_direction; |
75 PP_Point position; | 78 PP_Point position; |
76 uint32_t color; | 79 uint32_t color; |
77 PP_Rect clip; | 80 PP_Rect clip; |
78 bool clip_is_null; | 81 bool clip_is_null; |
79 PP_Bool image_data_is_opaque; | 82 PP_Bool image_data_is_opaque; |
80 }; | 83 }; |
81 | 84 |
82 struct PPBFlash_DrawGlyphs_Params { | 85 struct PPBFlash_DrawGlyphs_Params { |
| 86 PPBFlash_DrawGlyphs_Params(); |
| 87 ~PPBFlash_DrawGlyphs_Params(); |
| 88 |
83 PP_Resource pp_image_data; | 89 PP_Resource pp_image_data; |
84 SerializedFontDescription font_desc; | 90 SerializedFontDescription font_desc; |
85 uint32_t color; | 91 uint32_t color; |
86 PP_Point position; | 92 PP_Point position; |
87 PP_Rect clip; | 93 PP_Rect clip; |
88 float transformation[3][3]; | 94 float transformation[3][3]; |
89 std::vector<uint16_t> glyph_indices; | 95 std::vector<uint16_t> glyph_indices; |
90 std::vector<PP_Point> glyph_advances; | 96 std::vector<PP_Point> glyph_advances; |
91 }; | 97 }; |
92 | 98 |
93 } // namespace proxy | 99 } // namespace proxy |
94 } // namespace pp | 100 } // namespace pp |
95 | 101 |
96 | 102 |
97 | 103 |
98 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 104 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
OLD | NEW |