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

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: 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)
@@ -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());

Powered by Google App Engine
This is Rietveld 408576698