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

Unified Diff: chrome/common/gpu_messages.cc

Issue 6364013: Defered collect DirectX diagnostics until they are needed for about:gpu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 months 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
« no previous file with comments | « chrome/common/gpu_info_unittest.cc ('k') | chrome/common/gpu_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gpu_messages.cc
===================================================================
--- chrome/common/gpu_messages.cc (revision 72672)
+++ chrome/common/gpu_messages.cc (working copy)
@@ -128,7 +128,7 @@
#endif // if defined(OS_MACOSX)
void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int32>(p.progress()));
+ WriteParam(m, static_cast<int32>(p.level()));
WriteParam(m, p.initialization_time());
WriteParam(m, p.vendor_id());
WriteParam(m, p.device_id());
@@ -149,7 +149,7 @@
}
bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
- int32 progress;
+ int32 level;
base::TimeDelta initialization_time;
uint32 vendor_id;
uint32 device_id;
@@ -163,7 +163,7 @@
std::string gl_renderer;
std::string gl_extensions;
bool can_lose_context;
- bool ret = ReadParam(m, iter, &progress);
+ bool ret = ReadParam(m, iter, &level);
ret = ret && ReadParam(m, iter, &initialization_time);
ret = ret && ReadParam(m, iter, &vendor_id);
ret = ret && ReadParam(m, iter, &device_id);
@@ -177,7 +177,7 @@
ret = ret && ReadParam(m, iter, &gl_renderer);
ret = ret && ReadParam(m, iter, &gl_extensions);
ret = ret && ReadParam(m, iter, &can_lose_context);
- p->SetProgress(static_cast<GPUInfo::Progress>(progress));
+ p->SetLevel(static_cast<GPUInfo::Level>(level));
if (!ret)
return false;
@@ -205,7 +205,7 @@
void ParamTraits<GPUInfo> ::Log(const param_type& p, std::string* l) {
l->append(base::StringPrintf("<GPUInfo> %d %d %x %x %s %s %x %x %x %d",
- p.progress(),
+ p.level(),
static_cast<int32>(
p.initialization_time().InMilliseconds()),
p.vendor_id(),
@@ -218,6 +218,24 @@
p.can_lose_context()));
}
+
+void ParamTraits<GPUInfo::Level> ::Write(Message* m, const param_type& p) {
+ WriteParam(m, static_cast<int32>(p));
+}
+
+bool ParamTraits<GPUInfo::Level> ::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ int32 level;
+ bool ret = ReadParam(m, iter, &level);
+ *p = static_cast<GPUInfo::Level>(level);
+ return ret;
+}
+
+void ParamTraits<GPUInfo::Level> ::Log(const param_type& p, std::string* l) {
+ LogParam(static_cast<int32>(p), l);
+}
+
void ParamTraits<DxDiagNode> ::Write(Message* m, const param_type& p) {
WriteParam(m, p.values);
WriteParam(m, p.children);
« no previous file with comments | « chrome/common/gpu_info_unittest.cc ('k') | chrome/common/gpu_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698