Commit f7d19a3d authored by dcower's avatar dcower Committed by Commit bot

Added "Compositing manager" status to about:gpu

BUG=410560
TEST=about:gpu page on Linux under X11
R=zmo@chromium.org

Review URL: https://codereview.chromium.org/570173003

Cr-Commit-Position: refs/heads/master@{#295007}
parent ee8d1232
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#include "content/browser/gpu/gpu_internals_ui.h" #include "content/browser/gpu/gpu_internals_ui.h"
#if defined(OS_LINUX) && defined(USE_X11)
#include <X11/Xlib.h>
#endif
#include <string> #include <string>
#include "base/bind.h" #include "base/bind.h"
...@@ -37,6 +41,7 @@ ...@@ -37,6 +41,7 @@
#if defined(OS_LINUX) && defined(USE_X11) #if defined(OS_LINUX) && defined(USE_X11)
#include "ui/base/x/x11_util.h" #include "ui/base/x/x11_util.h"
#include "ui/gfx/x/x11_atom_cache.h"
#endif #endif
namespace content { namespace content {
...@@ -178,6 +183,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() { ...@@ -178,6 +183,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
const char kGDMSession[] = "GDMSESSION"; const char kGDMSession[] = "GDMSESSION";
if (env->GetVar(kGDMSession, &value)) if (env->GetVar(kGDMSession, &value))
basic_info->Append(NewDescriptionValuePair(kGDMSession, value)); basic_info->Append(NewDescriptionValuePair(kGDMSession, value));
const char* kAtomsToCache[] = {
"_NET_WM_CM_S0",
NULL
};
ui::X11AtomCache atom_cache(gfx::GetXDisplay(), kAtomsToCache);
std::string compositing_manager = XGetSelectionOwner(
gfx::GetXDisplay(),
atom_cache.GetAtom("_NET_WM_CM_S0")) != None ? "Yes" : "No";
basic_info->Append(
NewDescriptionValuePair("Compositing manager", compositing_manager));
} }
#endif #endif
std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment