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

Unified Diff: gpu/config/gpu_info_collector_wayland.cc

Issue 17265006: wayland patch for inspection Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « content/content_browser.gypi ('k') | gpu/gpu_config.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector_wayland.cc
diff --git a/gpu/config/gpu_info_collector_x11.cc b/gpu/config/gpu_info_collector_wayland.cc
similarity index 87%
copy from gpu/config/gpu_info_collector_x11.cc
copy to gpu/config/gpu_info_collector_wayland.cc
index d3a1b65c7a9459bb89029dbf67f8691ba0b3efcf..62bbbdae601749fc99063a08fe4c1e25792d83e1 100644
--- a/gpu/config/gpu_info_collector_x11.cc
+++ b/gpu/config/gpu_info_collector_wayland.cc
@@ -1,10 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/config/gpu_info_collector.h"
-#include <X11/Xlib.h>
#include <vector>
#include "base/command_line.h"
@@ -13,13 +12,11 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "base/string_util.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
-#include "base/strings/string_util.h"
#include "library_loaders/libpci.h"
-#include "third_party/libXNVCtrl/NVCtrl.h"
-#include "third_party/libXNVCtrl/NVCtrlLib.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
@@ -67,32 +64,9 @@ std::string CollectDriverVersionATI() {
return std::string();
}
-// Use NVCtrl extention to query NV driver version.
-// Return empty string on failing.
+// XXX
std::string CollectDriverVersionNVidia() {
- Display* display = base::MessagePumpForUI::GetDefaultXDisplay();
- if (!display) {
- LOG(ERROR) << "XOpenDisplay failed.";
- return std::string();
- }
- int event_base = 0, error_base = 0;
- if (!XNVCTRLQueryExtension(display, &event_base, &error_base)) {
- LOG(INFO) << "NVCtrl extension does not exist.";
return std::string();
- }
- int screen_count = ScreenCount(display);
- for (int screen = 0; screen < screen_count; ++screen) {
- char* buffer = NULL;
- if (XNVCTRLIsNvScreen(display, screen) &&
- XNVCTRLQueryStringAttribute(display, screen, 0,
- NV_CTRL_STRING_NVIDIA_DRIVER_VERSION,
- &buffer)) {
- std::string driver_version(buffer);
- XFree(buffer);
- return driver_version;
- }
- }
- return std::string();
}
const uint32 kVendorIDIntel = 0x8086;
« no previous file with comments | « content/content_browser.gypi ('k') | gpu/gpu_config.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698