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

Unified Diff: chrome/common/gpu_messages.cc

Issue 5612002: Blacklist bad GPU drivers: currenly we disable all gpu related features if th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: removing one garbage line in the code Created 10 years 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 side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698