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

Side by Side Diff: cc/ipc/cc_param_traits.h

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix reflector Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 typedef cc::SurfaceId param_type; 76 typedef cc::SurfaceId param_type;
77 static void GetSize(base::PickleSizer* s, const param_type& p); 77 static void GetSize(base::PickleSizer* s, const param_type& p);
78 static void Write(base::Pickle* m, const param_type& p); 78 static void Write(base::Pickle* m, const param_type& p);
79 static bool Read(const base::Pickle* m, 79 static bool Read(const base::Pickle* m,
80 base::PickleIterator* iter, 80 base::PickleIterator* iter,
81 param_type* r); 81 param_type* r);
82 static void Log(const param_type& p, std::string* l); 82 static void Log(const param_type& p, std::string* l);
83 }; 83 };
84 84
85 template <> 85 template <>
86 struct CC_IPC_EXPORT ParamTraits<cc::CompositorFrame> { 86 struct CC_IPC_EXPORT ParamTraits<cc::CompositorFrame> {
danakj 2016/06/23 20:34:40 delete this one then?
87 typedef cc::CompositorFrame param_type; 87 typedef cc::CompositorFrame param_type;
88 static void Write(base::Pickle* m, const param_type& p); 88 static void Write(base::Pickle* m, const param_type& p);
89 static bool Read(const base::Pickle* m, 89 static bool Read(const base::Pickle* m,
90 base::PickleIterator* iter, 90 base::PickleIterator* iter,
91 param_type* p); 91 param_type* p);
92 static void Log(const param_type& p, std::string* l); 92 static void Log(const param_type& p, std::string* l);
93 }; 93 };
94 94
95 template <> 95 template <>
96 struct CC_IPC_EXPORT ParamTraits<std::unique_ptr<cc::CompositorFrame>> {
danakj 2016/06/23 20:34:41 its a bit weird tho, why do you need to do it this
97 typedef std::unique_ptr<cc::CompositorFrame> param_type;
98 static void Write(base::Pickle* m, const param_type& p);
99 static bool Read(const base::Pickle* m,
100 base::PickleIterator* iter,
101 param_type* r);
102 static void Log(const param_type& p, std::string* l);
103 };
104
105 template <>
96 struct CC_IPC_EXPORT ParamTraits<cc::CompositorFrameAck> { 106 struct CC_IPC_EXPORT ParamTraits<cc::CompositorFrameAck> {
97 typedef cc::CompositorFrameAck param_type; 107 typedef cc::CompositorFrameAck param_type;
98 static void Write(base::Pickle* m, const param_type& p); 108 static void Write(base::Pickle* m, const param_type& p);
99 static bool Read(const base::Pickle* m, 109 static bool Read(const base::Pickle* m,
100 base::PickleIterator* iter, 110 base::PickleIterator* iter,
101 param_type* p); 111 param_type* p);
102 static void Log(const param_type& p, std::string* l); 112 static void Log(const param_type& p, std::string* l);
103 }; 113 };
104 114
105 template <> 115 template <>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 static void Write(base::Pickle* m, const param_type& p); 151 static void Write(base::Pickle* m, const param_type& p);
142 static bool Read(const base::Pickle* m, 152 static bool Read(const base::Pickle* m,
143 base::PickleIterator* iter, 153 base::PickleIterator* iter,
144 param_type* p); 154 param_type* p);
145 static void Log(const param_type& p, std::string* l); 155 static void Log(const param_type& p, std::string* l);
146 }; 156 };
147 157
148 } // namespace IPC 158 } // namespace IPC
149 159
150 #endif // CC_IPC_CC_PARAM_TRAITS_H_ 160 #endif // CC_IPC_CC_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698