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

Unified Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 570173003: Added "Compositing manager" status to about:gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving C system header above C++ headers Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_internals_ui.cc
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index f971266abae123473858934ba3fc2275eae0ef94..2cfe16f53fac04353082761b26b5d734b241ef4a 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -4,6 +4,10 @@
#include "content/browser/gpu/gpu_internals_ui.h"
+#if defined(OS_LINUX) && defined(USE_X11)
+#include <X11/Xlib.h>
+#endif
+
#include <string>
#include "base/bind.h"
@@ -37,6 +41,7 @@
#if defined(OS_LINUX) && defined(USE_X11)
#include "ui/base/x/x11_util.h"
+#include "ui/gfx/x/x11_atom_cache.h"
#endif
namespace content {
@@ -178,6 +183,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
const char kGDMSession[] = "GDMSESSION";
if (env->GetVar(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
std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698