diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 00:05:04 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 00:05:04 +0000 |
commit | 94f635a3e7bcc64a0ceb87f03edd6055c9ef3f53 (patch) | |
tree | 8f5e1822e2056fa704ec0ff3d22f5db4af0af56a /content | |
parent | dbf4d1b10747bf84c36bb4c52be753fbf1ef2be2 (diff) | |
download | chromium_src-94f635a3e7bcc64a0ceb87f03edd6055c9ef3f53.zip chromium_src-94f635a3e7bcc64a0ceb87f03edd6055c9ef3f53.tar.gz chromium_src-94f635a3e7bcc64a0ceb87f03edd6055c9ef3f53.tar.bz2 |
Merge 82662 - Fix diagnostics and log messages in about:gpu.
Review URL: http://codereview.chromium.org/6877028
BUG=78189
TBR=nduca@chromium.org
Review URL: http://codereview.chromium.org/6883207
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@83260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/gpu/gpu_info.cc | 46 | ||||
-rw-r--r-- | content/gpu/gpu_child_thread.cc | 2 |
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. |