Index: chrome/common/gpu_messages.cc |
=================================================================== |
--- chrome/common/gpu_messages.cc (revision 68066) |
+++ chrome/common/gpu_messages.cc (working copy) |
@@ -5,6 +5,7 @@ |
#include "chrome/common/gpu_messages.h" |
#include "chrome/common/gpu_create_command_buffer_config.h" |
+#include "chrome/common/gpu_feature_flags.h" |
#include "chrome/common/gpu_info.h" |
#include "chrome/common/dx_diag_node.h" |
#include "gfx/rect.h" |
@@ -129,6 +130,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); |
vangelis
2010/12/08 00:17:38
nit: combine all three in a single statement that
Zhenyao Mo
2010/12/09 00:06:06
Done.
|
+ 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()); |