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; |