OLD | NEW |
---|---|
(Empty) | |
1 #ifndef UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_H_ | |
2 #define UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_H_ | |
3 | |
4 #include "ui/ozone/common/mojo/display_mode_params.mojom.h" | |
5 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | |
6 | |
7 namespace mojo { | |
8 | |
9 template <> | |
10 struct StructTraits<ui::mojom::DisplayModeParamsDataView, ui::DisplayMode_Params > { | |
11 static const gfx::Size& size(const ui::DisplayMode_Params& d) { return d.size; } | |
12 static bool is_interlaced(const ui::DisplayMode_Params& d) { return d.is_inter laced; } | |
13 static float refresh_rate(const ui::DisplayMode_Params& d) { | |
14 return d.refresh_rate; | |
15 } | |
16 | |
17 static bool Read(ui::mojom::DisplayModeParamsDataView data, ui::DisplayMode_Pa rams* out) { | |
18 | |
kylechar
2017/01/16 23:08:24
You're not setting is_interlaced or refresh_rate o
thanhph1
2017/01/17 16:47:59
Done, thanks!
| |
19 if (data.is_null()) | |
20 return false; | |
21 | |
22 if (!data.ReadSize(&out->size)) | |
23 return false; | |
24 return true; | |
25 } | |
26 | |
27 }; | |
28 | |
29 } | |
30 | |
31 #endif // UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_H_ | |
OLD | NEW |