summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-24 16:46:15 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-11-27 21:18:29 +0100
commit40ad9eea885db925fc7ad8872d529a7c5cb43a5a (patch)
tree7ecbcdb4dc1e874ffe9f7e76462075344e4d1d45 /vcl/inc
parent4feaf96f50fa89eccb4e7a638220099e9a8482f1 (diff)
implement windows OpenGL blacklist, first step
Change-Id: I408b76855693c64473dba3bb3fa94374fff01fae
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/opengl/win/WinDeviceInfo.hxx121
1 files changed, 121 insertions, 0 deletions
diff --git a/vcl/inc/opengl/win/WinDeviceInfo.hxx b/vcl/inc/opengl/win/WinDeviceInfo.hxx
new file mode 100644
index 000000000000..140662e9f840
--- /dev/null
+++ b/vcl/inc/opengl/win/WinDeviceInfo.hxx
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_VCL_OPENGL_WIN_WINDEVICEINFO_HXX
+#define INCLUDED_VCL_OPENGL_WIN_WINDEVICEINFO_HXX
+
+#include "opengl/DeviceInfo.hxx"
+#include <rtl/ustring.hxx>
+
+namespace wgl {
+
+enum OperatingSystem {
+ DRIVER_OS_UNKNOWN = 0,
+ DRIVER_OS_WINDOWS_XP,
+ DRIVER_OS_WINDOWS_SERVER_2003,
+ DRIVER_OS_WINDOWS_VISTA,
+ DRIVER_OS_WINDOWS_7,
+ DRIVER_OS_WINDOWS_8,
+ DRIVER_OS_WINDOWS_8_1,
+ DRIVER_OS_LINUX,
+ DRIVER_OS_OS_X_10_5,
+ DRIVER_OS_OS_X_10_6,
+ DRIVER_OS_OS_X_10_7,
+ DRIVER_OS_OS_X_10_8,
+ DRIVER_OS_ANDROID,
+ DRIVER_OS_ALL
+};
+
+enum VersionComparisonOp {
+ DRIVER_LESS_THAN, // driver < version
+ DRIVER_LESS_THAN_OR_EQUAL, // driver <= version
+ DRIVER_GREATER_THAN, // driver > version
+ DRIVER_GREATER_THAN_OR_EQUAL, // driver >= version
+ DRIVER_EQUAL, // driver == version
+ DRIVER_NOT_EQUAL, // driver != version
+ DRIVER_BETWEEN_EXCLUSIVE, // driver > version && driver < versionMax
+ DRIVER_BETWEEN_INCLUSIVE, // driver >= version && driver <= versionMax
+ DRIVER_BETWEEN_INCLUSIVE_START, // driver >= version && driver < versionMax
+ DRIVER_COMPARISON_IGNORED
+};
+
+enum DeviceFamily {
+ IntelGMA500,
+ IntelGMA900,
+ IntelGMA950,
+ IntelGMA3150,
+ IntelGMAX3000,
+ IntelGMAX4500HD,
+ IntelHD3000,
+ IntelMobileHDGraphics,
+ NvidiaBlockD3D9Layers,
+ RadeonX1000,
+ Geforce7300GT,
+ Nvidia310M,
+ DeviceFamilyMax
+};
+
+enum DeviceVendor {
+ VendorAll,
+ VendorIntel,
+ VendorNVIDIA,
+ VendorAMD,
+ VendorATI,
+ VendorMicrosoft,
+ DeviceVendorMax
+};
+
+}
+
+class WinOpenGLDeviceInfo : public OpenGLDeviceInfo
+{
+private:
+ OUString maDriverVersion;
+ OUString maDriverVersion2;
+
+ OUString maDriverDate;
+ OUString maDriverDate2;
+
+ OUString maDeviceID;
+ OUString maDeviceID2;
+
+ OUString maAdapterVendorID;
+ OUString maAdapterDeviceID;
+ OUString maAdapterSubsysID;
+
+ OUString maAdapterVendorID2;
+ OUString maAdapterDeviceID2;
+ OUString maAdapterSubsysID2;
+
+ OUString maDeviceKey;
+ OUString maDeviceKey2;
+
+ OUString maDeviceString;
+ OUString maDeviceString2;
+ uint32_t mnWindowsVersion;
+
+ bool mbHasDualGPU;
+ bool mbHasDriverVersionMismatch;
+ bool mbRDP;
+
+ void GetData();
+ OUString GetDeviceVendor(wgl::DeviceVendor eVendor);
+
+ static OUString* mpDeviceVendors[wgl::DeviceVendorMax];
+
+public:
+ WinOpenGLDeviceInfo();
+ virtual ~WinOpenGLDeviceInfo();
+
+ virtual bool isDeviceBlocked();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */