vcl/opengl/win/WinDeviceInfo.cxx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
New commits: commit 47eaebc3b4234b7bcfa790fc2eb584044f1ed8f4 Author: Michael Stahl <mst...@redhat.com> Date: Fri Nov 27 13:16:17 2015 +0100 Revert "Revert "write a log file about OpenGL driver"" This reverts commit 2ebca292f96494a13a0d0baa8b19dd9010616abe. The build breakage in gengal was caused by the global variable aCacheFolder, which is initialized by a call to rtl::Bootstrap::expandMacros(), which initializes the global FundamentalIni object before tools::extendApplicationEnvironment() gets a chance to set URE_BOOTSTRAP, so FundamentalIni is empty. Change-Id: I10d8652dab15ee6924ff4ceff17000963975e30f Reviewed-on: https://gerrit.libreoffice.org/20232 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx index 6bed2c0..fe3297c 100644 --- a/vcl/opengl/win/WinDeviceInfo.cxx +++ b/vcl/opengl/win/WinDeviceInfo.cxx @@ -532,6 +532,28 @@ bool WinOpenGLDeviceInfo::FindBlocklistedDeviceInList() return match; } +namespace { + +OUString getCacheFolder() +{ + OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"); + rtl::Bootstrap::expandMacros(url); + + osl::Directory::create(url); + + return url; +} + +void writeToLog(SvStream& rStrm, const char* pKey, const OUString rVal) +{ + rStrm.WriteCharPtr(pKey); + rStrm.WriteCharPtr(": "); + rStrm.WriteOString(OUStringToOString(rVal, RTL_TEXTENCODING_UTF8)); + rStrm.WriteChar('\n'); +} + +} + bool WinOpenGLDeviceInfo::isDeviceBlocked() { SAL_INFO("vcl.opengl", maDriverVersion); @@ -543,6 +565,20 @@ bool WinOpenGLDeviceInfo::isDeviceBlocked() SAL_INFO("vcl.opengl", maDeviceKey); SAL_INFO("vcl.opengl", maDeviceString); + OUString aCacheFolder = getCacheFolder(); + + OUString aCacheFile(aCacheFolder + "/opengl_device.log"); + SvFileStream aOpenGLLogFile(aCacheFile, StreamMode::WRITE); + + writeToLog(aOpenGLLogFile, "DriverVersion", maDriverVersion); + writeToLog(aOpenGLLogFile, "DriverDate", maDriverDate); + writeToLog(aOpenGLLogFile, "DeviceID", maDeviceID); + writeToLog(aOpenGLLogFile, "AdapterVendorID", maAdapterVendorID); + writeToLog(aOpenGLLogFile, "AdapterDeviceID", maAdapterDeviceID); + writeToLog(aOpenGLLogFile, "AdapterSubsysID", maAdapterSubsysID); + writeToLog(aOpenGLLogFile, "DeviceKey", maDeviceKey); + writeToLog(aOpenGLLogFile, "DeviceString", maDeviceString); + // Check if the device is blocked from the downloaded blocklist. If not, check // the static list after that. This order is used so that we can later escape // out of static blocks (i.e. if we were wrong or something was patched, we _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits