OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CC_RENDER_PASS_TRAITS_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_CC_RENDER_PASS_TRAITS_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "ipc/ipc_message_utils.h" |
| 10 |
| 11 namespace cc { |
| 12 class CCRenderPass; |
| 13 class CCDrawQuad; |
| 14 class CCSharedQuadState; |
| 15 class IntRect; |
| 16 class FloatRect; |
| 17 } |
| 18 |
| 19 namespace WebCore { |
| 20 class IntPoint; |
| 21 class IntSize; |
| 22 class FloatPoint; |
| 23 class FloatSize; |
| 24 } |
| 25 |
| 26 namespace WebKit { |
| 27 class WebTransformationMatrix; |
| 28 } |
| 29 |
| 30 namespace IPC { |
| 31 |
| 32 template<> |
| 33 struct CONTENT_EXPORT ParamTraits<cc::IntRect> { |
| 34 typedef cc::IntRect param_type; |
| 35 static void Write(Message* m, const param_type& p); |
| 36 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 37 static void Log(const param_type& p, std::string* l); |
| 38 }; |
| 39 |
| 40 template<> |
| 41 struct CONTENT_EXPORT ParamTraits<WebCore::IntPoint> { |
| 42 typedef WebCore::IntPoint param_type; |
| 43 static void Write(Message* m, const param_type& p); |
| 44 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 45 static void Log(const param_type& p, std::string* l); |
| 46 }; |
| 47 |
| 48 template<> |
| 49 struct CONTENT_EXPORT ParamTraits<WebCore::IntSize> { |
| 50 typedef WebCore::IntSize param_type; |
| 51 static void Write(Message* m, const param_type& p); |
| 52 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 53 static void Log(const param_type& p, std::string* l); |
| 54 }; |
| 55 |
| 56 template<> |
| 57 struct CONTENT_EXPORT ParamTraits<cc::FloatRect> { |
| 58 typedef cc::FloatRect param_type; |
| 59 static void Write(Message* m, const param_type& p); |
| 60 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 61 static void Log(const param_type& p, std::string* l); |
| 62 }; |
| 63 |
| 64 template<> |
| 65 struct CONTENT_EXPORT ParamTraits<WebCore::FloatPoint> { |
| 66 typedef WebCore::FloatPoint param_type; |
| 67 static void Write(Message* m, const param_type& p); |
| 68 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 69 static void Log(const param_type& p, std::string* l); |
| 70 }; |
| 71 |
| 72 template<> |
| 73 struct CONTENT_EXPORT ParamTraits<WebCore::FloatSize> { |
| 74 typedef WebCore::FloatSize param_type; |
| 75 static void Write(Message* m, const param_type& p); |
| 76 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 77 static void Log(const param_type& p, std::string* l); |
| 78 }; |
| 79 |
| 80 template<> |
| 81 struct CONTENT_EXPORT ParamTraits<cc::CCSharedQuadState> { |
| 82 typedef cc::CCSharedQuadState param_type; |
| 83 static void Write(Message* m, const param_type& p); |
| 84 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 85 static void Log(const param_type& p, std::string* l); |
| 86 }; |
| 87 |
| 88 template<> |
| 89 struct CONTENT_EXPORT ParamTraits<cc::CCRenderPass> { |
| 90 typedef cc::CCRenderPass param_type; |
| 91 static void Write(Message* m, const param_type& p); |
| 92 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 93 static void Log(const param_type& p, std::string* l); |
| 94 |
| 95 static cc::CCRenderPass* ReadRenderPass(const Message* m, PickleIterator* iter
); |
| 96 }; |
| 97 |
| 98 } // namespace IPC |
| 99 |
| 100 #endif // CONTENT_COMMON_GPU_CLIENT_CC_RENDER_PASS_TRAITS_H_ |
OLD | NEW |