Kaydet (Commit) 47eaebc3 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Thorsten Behrens

Revert "Revert "write a log file about OpenGL driver""

This reverts commit 2ebca292.

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/20232Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 700f080f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment