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

Side by Side Diff: gpu/ipc/gpu_command_buffer_traits.h

Issue 1659003003: IPC::Message -> base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more mac fix Created 4 years, 10 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 #ifndef GPU_IPC_GPU_PARAM_TRAITS_H_ 5 #ifndef GPU_IPC_GPU_PARAM_TRAITS_H_
6 #define GPU_IPC_GPU_PARAM_TRAITS_H_ 6 #define GPU_IPC_GPU_PARAM_TRAITS_H_
7 7
8 #include "gpu/command_buffer/common/command_buffer.h" 8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "gpu/gpu_export.h" 9 #include "gpu/gpu_export.h"
10 #include "gpu/ipc/gpu_command_buffer_traits_multi.h" 10 #include "gpu/ipc/gpu_command_buffer_traits_multi.h"
11 #include "ipc/ipc_message_utils.h" 11 #include "ipc/ipc_message_utils.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 struct Mailbox; 14 struct Mailbox;
15 struct MailboxHolder; 15 struct MailboxHolder;
16 struct SyncToken; 16 struct SyncToken;
17 union ValueState; 17 union ValueState;
18 } 18 }
19 19
20 namespace IPC { 20 namespace IPC {
21 21
22 template <> 22 template <>
23 struct GPU_EXPORT ParamTraits<gpu::CommandBuffer::State> { 23 struct GPU_EXPORT ParamTraits<gpu::CommandBuffer::State> {
24 typedef gpu::CommandBuffer::State param_type; 24 typedef gpu::CommandBuffer::State param_type;
25 static void Write(Message* m, const param_type& p); 25 static void Write(base::Pickle* m, const param_type& p);
26 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 26 static bool Read(const base::Pickle* m,
27 base::PickleIterator* iter,
28 param_type* p);
27 static void Log(const param_type& p, std::string* l); 29 static void Log(const param_type& p, std::string* l);
28 }; 30 };
29 31
30 template <> 32 template <>
31 struct GPU_EXPORT ParamTraits<gpu::SyncToken> { 33 struct GPU_EXPORT ParamTraits<gpu::SyncToken> {
32 typedef gpu::SyncToken param_type; 34 typedef gpu::SyncToken param_type;
33 static void Write(Message* m, const param_type& p); 35 static void Write(base::Pickle* m, const param_type& p);
34 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 36 static bool Read(const base::Pickle* m,
37 base::PickleIterator* iter,
38 param_type* p);
35 static void Log(const param_type& p, std::string* l); 39 static void Log(const param_type& p, std::string* l);
36 }; 40 };
37 41
38 template<> 42 template<>
39 struct GPU_EXPORT ParamTraits<gpu::Mailbox> { 43 struct GPU_EXPORT ParamTraits<gpu::Mailbox> {
40 typedef gpu::Mailbox param_type; 44 typedef gpu::Mailbox param_type;
41 static void Write(Message* m, const param_type& p); 45 static void Write(base::Pickle* m, const param_type& p);
42 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 46 static bool Read(const base::Pickle* m,
47 base::PickleIterator* iter,
48 param_type* p);
43 static void Log(const param_type& p, std::string* l); 49 static void Log(const param_type& p, std::string* l);
44 }; 50 };
45 51
46 template <> 52 template <>
47 struct GPU_EXPORT ParamTraits<gpu::MailboxHolder> { 53 struct GPU_EXPORT ParamTraits<gpu::MailboxHolder> {
48 typedef gpu::MailboxHolder param_type; 54 typedef gpu::MailboxHolder param_type;
49 static void Write(Message* m, const param_type& p); 55 static void Write(base::Pickle* m, const param_type& p);
50 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 56 static bool Read(const base::Pickle* m,
57 base::PickleIterator* iter,
58 param_type* p);
51 static void Log(const param_type& p, std::string* l); 59 static void Log(const param_type& p, std::string* l);
52 }; 60 };
53 61
54 template <> 62 template <>
55 struct GPU_EXPORT ParamTraits<gpu::ValueState> { 63 struct GPU_EXPORT ParamTraits<gpu::ValueState> {
56 typedef gpu::ValueState param_type; 64 typedef gpu::ValueState param_type;
57 static void Write(Message* m, const param_type& p); 65 static void Write(base::Pickle* m, const param_type& p);
58 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 66 static bool Read(const base::Pickle* m,
67 base::PickleIterator* iter,
68 param_type* p);
59 static void Log(const param_type& p, std::string* l); 69 static void Log(const param_type& p, std::string* l);
60 }; 70 };
61 71
62 } // namespace IPC 72 } // namespace IPC
63 73
64 #endif // GPU_IPC_GPU_PARAM_TRAITS_H_ 74 #endif // GPU_IPC_GPU_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « extensions/common/permissions/settings_override_permission.cc ('k') | gpu/ipc/gpu_command_buffer_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698