Index: chrome/common/gpu_messages.cc |
=================================================================== |
--- chrome/common/gpu_messages.cc (revision 68066) |
+++ chrome/common/gpu_messages.cc (working copy) |
@@ -129,6 +129,35 @@ |
} |
#endif // if defined(OS_MACOSX) |
+void ParamTraits<GpuFeatureFlags> ::Write(Message* m, const param_type& p) { |
+ WriteParam(m, p.is_accelerated_2d_canvas_blacklisted()); |
+ WriteParam(m, p.is_accelerated_compositing_blacklisted()); |
+ WriteParam(m, p.is_webgl_blacklisted()); |
+} |
+ |
+bool ParamTraits<GpuFeatureFlags> ::Read( |
+ const Message* m, void** iter, param_type* p) { |
+ bool is_accelerated_2d_canvas_blacklisted; |
+ bool is_accelerated_compositing_blacklisted; |
+ bool is_webgl_blacklisted; |
+ bool ret = ReadParam(m, iter, &is_accelerated_2d_canvas_blacklisted); |
+ ret = ret && ReadParam(m, iter, &is_accelerated_compositing_blacklisted); |
+ ret = ret && ReadParam(m, iter, &is_webgl_blacklisted); |
+ if (!ret) |
+ return false; |
+ p->SetFlags(is_accelerated_2d_canvas_blacklisted, |
+ is_accelerated_compositing_blacklisted, |
+ is_webgl_blacklisted); |
+ return true; |
+} |
+ |
+void ParamTraits<GpuFeatureFlags> ::Log(const param_type& p, std::string* l) { |
+ l->append(base::StringPrintf("<GpuFeatureFlags> %d %d %d", |
+ p.is_accelerated_2d_canvas_blacklisted(), |
+ p.is_accelerated_compositing_blacklisted(), |
+ p.is_webgl_blacklisted())); |
+} |
+ |
void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { |
WriteParam(m, static_cast<int32>(p.progress())); |
WriteParam(m, p.initialization_time()); |