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 // IPC Messages sent between compositor instances. | 5 // IPC Messages sent between compositor instances. |
6 | 6 |
7 #ifndef CC_IPC_CC_PARAM_TRAITS_H_ | 7 #ifndef CC_IPC_CC_PARAM_TRAITS_H_ |
8 #define CC_IPC_CC_PARAM_TRAITS_H_ | 8 #define CC_IPC_CC_PARAM_TRAITS_H_ |
9 | 9 |
10 #include "cc/ipc/cc_ipc_export.h" | 10 #include "cc/ipc/cc_ipc_export.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 typedef cc::FrameSinkId param_type; | 75 typedef cc::FrameSinkId param_type; |
76 static void GetSize(base::PickleSizer* s, const param_type& p); | 76 static void GetSize(base::PickleSizer* s, const param_type& p); |
77 static void Write(base::Pickle* m, const param_type& p); | 77 static void Write(base::Pickle* m, const param_type& p); |
78 static bool Read(const base::Pickle* m, | 78 static bool Read(const base::Pickle* m, |
79 base::PickleIterator* iter, | 79 base::PickleIterator* iter, |
80 param_type* r); | 80 param_type* r); |
81 static void Log(const param_type& p, std::string* l); | 81 static void Log(const param_type& p, std::string* l); |
82 }; | 82 }; |
83 | 83 |
84 template <> | 84 template <> |
| 85 struct CC_IPC_EXPORT ParamTraits<cc::LocalFrameId> { |
| 86 typedef cc::LocalFrameId param_type; |
| 87 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 88 static void Write(base::Pickle* m, const param_type& p); |
| 89 static bool Read(const base::Pickle* m, |
| 90 base::PickleIterator* iter, |
| 91 param_type* r); |
| 92 static void Log(const param_type& p, std::string* l); |
| 93 }; |
| 94 |
| 95 template <> |
85 struct CC_IPC_EXPORT ParamTraits<cc::SurfaceId> { | 96 struct CC_IPC_EXPORT ParamTraits<cc::SurfaceId> { |
86 typedef cc::SurfaceId param_type; | 97 typedef cc::SurfaceId param_type; |
87 static void GetSize(base::PickleSizer* s, const param_type& p); | 98 static void GetSize(base::PickleSizer* s, const param_type& p); |
88 static void Write(base::Pickle* m, const param_type& p); | 99 static void Write(base::Pickle* m, const param_type& p); |
89 static bool Read(const base::Pickle* m, | 100 static bool Read(const base::Pickle* m, |
90 base::PickleIterator* iter, | 101 base::PickleIterator* iter, |
91 param_type* r); | 102 param_type* r); |
92 static void Log(const param_type& p, std::string* l); | 103 static void Log(const param_type& p, std::string* l); |
93 }; | 104 }; |
94 | 105 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 static void Write(base::Pickle* m, const param_type& p); | 163 static void Write(base::Pickle* m, const param_type& p); |
153 static bool Read(const base::Pickle* m, | 164 static bool Read(const base::Pickle* m, |
154 base::PickleIterator* iter, | 165 base::PickleIterator* iter, |
155 param_type* p); | 166 param_type* p); |
156 static void Log(const param_type& p, std::string* l); | 167 static void Log(const param_type& p, std::string* l); |
157 }; | 168 }; |
158 | 169 |
159 } // namespace IPC | 170 } // namespace IPC |
160 | 171 |
161 #endif // CC_IPC_CC_PARAM_TRAITS_H_ | 172 #endif // CC_IPC_CC_PARAM_TRAITS_H_ |
OLD | NEW |