summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-22 16:53:30 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-22 16:53:30 +0000
commit602cf9fda524a12ffff46bf14a749535df136d5d (patch)
treeef474be9ad56dce5ae0253a298ec535eaa9fe728 /content
parent83bae9b92cffe4f2a9ea2805dae8ab3dde1aa62e (diff)
downloadchromium_src-602cf9fda524a12ffff46bf14a749535df136d5d.zip
chromium_src-602cf9fda524a12ffff46bf14a749535df136d5d.tar.gz
chromium_src-602cf9fda524a12ffff46bf14a749535df136d5d.tar.bz2
Fix diagnostics and log messages in about:gpu.
BUG=78189 Review URL: http://codereview.chromium.org/6877028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/gpu/gpu_info.cc46
-rw-r--r--content/gpu/gpu_child_thread.cc2
2 files changed, 32 insertions, 16 deletions
diff --git a/content/common/gpu/gpu_info.cc b/content/common/gpu/gpu_info.cc
index f067baf..afd7686 100644
--- a/content/common/gpu/gpu_info.cc
+++ b/content/common/gpu/gpu_info.cc
@@ -23,41 +23,55 @@ bool GPUInfo::Merge(const GPUInfo& other) {
if (!finalized) {
finalized = other.finalized;
initialization_time = other.initialization_time;
- if (driver_vendor.empty() && !other.driver_vendor.empty()) {
+
+ if (driver_vendor.empty()) {
+ changed |= driver_vendor != other.driver_vendor;
driver_vendor = other.driver_vendor;
- changed = true;
}
- if (driver_version.empty() && !other.driver_version.empty()) {
+ if (driver_version.empty()) {
+ changed |= driver_version != other.driver_version;
driver_version = other.driver_version;
- changed = true;
}
- if (driver_date.empty() && !other.driver_date.empty()) {
+ if (driver_date.empty()) {
+ changed |= driver_date != other.driver_date;
driver_date = other.driver_date;
- changed = true;
}
- if (pixel_shader_version.empty())
+ if (pixel_shader_version.empty()) {
+ changed |= pixel_shader_version != other.pixel_shader_version;
pixel_shader_version = other.pixel_shader_version;
- if (vertex_shader_version.empty())
+ }
+ if (vertex_shader_version.empty()) {
+ changed |= vertex_shader_version != other.vertex_shader_version;
vertex_shader_version = other.vertex_shader_version;
- if (gl_version.empty())
+ }
+ if (gl_version.empty()) {
+ changed |= gl_version != other.gl_version;
gl_version = other.gl_version;
- if (gl_version_string.empty())
+ }
+ if (gl_version_string.empty()) {
+ changed |= gl_version_string != other.gl_version_string;
gl_version_string = other.gl_version_string;
- if (gl_vendor.empty())
+ }
+ if (gl_vendor.empty()) {
+ changed |= gl_vendor != other.gl_vendor;
gl_vendor = other.gl_vendor;
- if (gl_renderer.empty() && !other.gl_renderer.empty()) {
+ }
+ if (gl_renderer.empty()) {
+ changed |= gl_renderer != other.gl_renderer;
gl_renderer = other.gl_renderer;
- changed = true;
}
- if (gl_extensions.empty())
+ if (gl_extensions.empty()) {
+ changed |= gl_extensions != other.gl_extensions;
gl_extensions = other.gl_extensions;
+ }
can_lose_context = other.can_lose_context;
#if defined(OS_WIN)
if (dx_diagnostics.values.size() == 0 &&
- dx_diagnostics.children.size() == 0)
+ dx_diagnostics.children.size() == 0) {
dx_diagnostics = other.dx_diagnostics;
+ changed = true;
+ }
#endif
}
return changed;
}
-
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 1a04e1b..e5bf6d6 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -115,6 +115,8 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void GpuChildThread::OnInitialize() {
+ logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
+
// Load the GL implementation and locate the bindings before starting the GPU
// watchdog because this can take a lot of time and the GPU watchdog might
// terminate the GPU process.