Chromium Code Reviews| 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 #include "cc/checkerboard_draw_quad.h" | 7 #include "cc/checkerboard_draw_quad.h" |
| 8 #include "cc/compositor_frame.h" | |
| 8 #include "cc/compositor_frame_ack.h" | 9 #include "cc/compositor_frame_ack.h" |
| 9 #include "cc/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
| 11 #include "cc/delegated_compositor_frame.h" | |
| 10 #include "cc/draw_quad.h" | 12 #include "cc/draw_quad.h" |
| 13 #include "cc/gl_compositor_frame.h" | |
| 11 #include "cc/io_surface_draw_quad.h" | 14 #include "cc/io_surface_draw_quad.h" |
| 12 #include "cc/render_pass.h" | 15 #include "cc/render_pass.h" |
| 13 #include "cc/render_pass_draw_quad.h" | 16 #include "cc/render_pass_draw_quad.h" |
| 14 #include "cc/shared_quad_state.h" | 17 #include "cc/shared_quad_state.h" |
| 15 #include "cc/solid_color_draw_quad.h" | 18 #include "cc/solid_color_draw_quad.h" |
| 16 #include "cc/stream_video_draw_quad.h" | 19 #include "cc/stream_video_draw_quad.h" |
| 17 #include "cc/texture_draw_quad.h" | 20 #include "cc/texture_draw_quad.h" |
| 18 #include "cc/tile_draw_quad.h" | 21 #include "cc/tile_draw_quad.h" |
| 19 #include "cc/transferable_resource.h" | 22 #include "cc/transferable_resource.h" |
| 20 #include "cc/video_layer_impl.h" | 23 #include "cc/video_layer_impl.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 | 78 |
| 76 template<> | 79 template<> |
| 77 struct CONTENT_EXPORT ParamTraits<cc::Mailbox> { | 80 struct CONTENT_EXPORT ParamTraits<cc::Mailbox> { |
| 78 typedef cc::Mailbox param_type; | 81 typedef cc::Mailbox param_type; |
| 79 static void Write(Message* m, const param_type& p); | 82 static void Write(Message* m, const param_type& p); |
| 80 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 83 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 81 static void Log(const param_type& p, std::string* l); | 84 static void Log(const param_type& p, std::string* l); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 template<> | 87 template<> |
| 85 struct CONTENT_EXPORT ParamTraits<cc::CompositorFrame> { | 88 struct CONTENT_EXPORT ParamTraits<cc::DelegatedCompositorFrame> { |
| 86 typedef cc::CompositorFrame param_type; | 89 typedef cc::DelegatedCompositorFrame param_type; |
| 87 static void Write(Message* m, const param_type& p); | 90 static void Write(Message* m, const param_type& p); |
| 88 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 91 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 89 static void Log(const param_type& p, std::string* l); | 92 static void Log(const param_type& p, std::string* l); |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 } // namespace IPC | 95 } // namespace IPC |
| 93 | 96 |
| 94 #endif // CONTENT_COMMON_CC_MESSAGES_H_ | 97 #endif // CONTENT_COMMON_CC_MESSAGES_H_ |
| 95 | 98 |
| 96 // Multiply-included message file, hence no include guard. | 99 // Multiply-included message file, hence no include guard. |
| 97 | 100 |
| 98 #define IPC_MESSAGE_START CCMsgStart | 101 #define IPC_MESSAGE_START CCMsgStart |
| 99 #undef IPC_MESSAGE_EXPORT | 102 #undef IPC_MESSAGE_EXPORT |
| 100 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 103 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 101 | 104 |
| 105 IPC_ENUM_TRAITS(cc::CompositorFrame::FrameType) | |
| 102 IPC_ENUM_TRAITS(cc::DrawQuad::Material) | 106 IPC_ENUM_TRAITS(cc::DrawQuad::Material) |
| 103 IPC_ENUM_TRAITS(cc::IOSurfaceDrawQuad::Orientation) | 107 IPC_ENUM_TRAITS(cc::IOSurfaceDrawQuad::Orientation) |
| 104 IPC_ENUM_TRAITS(WebKit::WebFilterOperation::FilterType) | 108 IPC_ENUM_TRAITS(WebKit::WebFilterOperation::FilterType) |
| 105 | 109 |
| 106 IPC_STRUCT_TRAITS_BEGIN(cc::RenderPass::Id) | 110 IPC_STRUCT_TRAITS_BEGIN(cc::RenderPass::Id) |
| 107 IPC_STRUCT_TRAITS_MEMBER(layer_id) | 111 IPC_STRUCT_TRAITS_MEMBER(layer_id) |
| 108 IPC_STRUCT_TRAITS_MEMBER(index) | 112 IPC_STRUCT_TRAITS_MEMBER(index) |
| 109 IPC_STRUCT_TRAITS_END() | 113 IPC_STRUCT_TRAITS_END() |
| 110 | 114 |
| 111 IPC_STRUCT_TRAITS_BEGIN(cc::VideoLayerImpl::FramePlane) | 115 IPC_STRUCT_TRAITS_BEGIN(cc::VideoLayerImpl::FramePlane) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 IPC_STRUCT_TRAITS_END() | 208 IPC_STRUCT_TRAITS_END() |
| 205 | 209 |
| 206 IPC_STRUCT_TRAITS_BEGIN(cc::TransferableResourceList) | 210 IPC_STRUCT_TRAITS_BEGIN(cc::TransferableResourceList) |
| 207 IPC_STRUCT_TRAITS_MEMBER(sync_point) | 211 IPC_STRUCT_TRAITS_MEMBER(sync_point) |
| 208 IPC_STRUCT_TRAITS_MEMBER(resources) | 212 IPC_STRUCT_TRAITS_MEMBER(resources) |
| 209 IPC_STRUCT_TRAITS_END() | 213 IPC_STRUCT_TRAITS_END() |
| 210 | 214 |
| 211 IPC_STRUCT_TRAITS_BEGIN(cc::CompositorFrameAck) | 215 IPC_STRUCT_TRAITS_BEGIN(cc::CompositorFrameAck) |
| 212 IPC_STRUCT_TRAITS_MEMBER(resources) | 216 IPC_STRUCT_TRAITS_MEMBER(resources) |
| 213 IPC_STRUCT_TRAITS_END() | 217 IPC_STRUCT_TRAITS_END() |
| 218 | |
| 219 IPC_STRUCT_TRAITS_BEGIN(cc::CompositorFrameMetadata) | |
| 220 IPC_STRUCT_TRAITS_MEMBER(root_scroll_offset) | |
| 221 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) | |
| 222 IPC_STRUCT_TRAITS_MEMBER(viewport_size) | |
| 223 IPC_STRUCT_TRAITS_MEMBER(root_layer_size) | |
| 224 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) | |
| 225 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) | |
| 226 IPC_STRUCT_TRAITS_MEMBER(location_bar_offset) | |
| 227 IPC_STRUCT_TRAITS_END() | |
| 228 | |
| 229 IPC_STRUCT_TRAITS_BEGIN(cc::CompositorFrame) | |
| 230 IPC_STRUCT_TRAITS_MEMBER(type) | |
|
piman
2012/12/14 22:02:22
Somewhere, we need to check the enum values, verif
| |
| 231 IPC_STRUCT_TRAITS_MEMBER(metadata) | |
| 232 IPC_STRUCT_TRAITS_END() | |
| 233 | |
| 234 IPC_STRUCT_TRAITS_BEGIN(cc::GLCompositorFrame) | |
| 235 IPC_STRUCT_TRAITS_PARENT(cc::CompositorFrame) | |
|
piman
2012/12/14 22:02:22
We should check somewhere that type == GL.
| |
| 236 IPC_STRUCT_TRAITS_MEMBER(mailbox_name) | |
| 237 IPC_STRUCT_TRAITS_MEMBER(sync_point) | |
| 238 IPC_STRUCT_TRAITS_END() | |
| OLD | NEW |