diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-06-25 10:35:00 +0200 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2020-06-26 12:50:20 +0200 |
commit | f43fcef36a08da5adf630df8ade8f5b3a210581b (patch) | |
tree | 4d4ca7c6f60a07b52193182856a0beb099037717 /vcl | |
parent | d00d56db1b5552e5db52caa9058e5d6ca0ff1de4 (diff) |
log properly the compiler used to compile Skia
Using #define's directly from VCL will report the compiler used
to compile VCL, which may be different from the one used for Skia.
Also truncate the log file on opening.
Change-Id: Iddf613613df20505f1abe1dd5468dcc8c7041410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97090
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 014916c7c76cfaf9baa3f76a2169ba8343f0cfbb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97135
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/win/WinDeviceInfo.cxx | 2 | ||||
-rw-r--r-- | vcl/skia/SkiaHelper.cxx | 15 |
2 files changed, 5 insertions, 12 deletions
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx index 3fb4035ec58c..9ea39abd8b43 100644 --- a/vcl/opengl/win/WinDeviceInfo.cxx +++ b/vcl/opengl/win/WinDeviceInfo.cxx @@ -219,7 +219,7 @@ bool WinOpenGLDeviceInfo::isDeviceBlocked() OUString aCacheFolder = getCacheFolder(); OUString aCacheFile(aCacheFolder + "/opengl_device.log"); - SvFileStream aOpenGLLogFile(aCacheFile, StreamMode::WRITE); + SvFileStream aOpenGLLogFile(aCacheFile, StreamMode::WRITE|StreamMode::TRUNC); writeToLog(aOpenGLLogFile, "DriverVersion", maDriverVersion); writeToLog(aOpenGLLogFile, "DriverDate", maDriverDate); diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index 5fec448830c7..e31540ae449c 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -36,6 +36,7 @@ bool isVCLSkiaEnabled() { return false; } #include <SkCanvas.h> #include <SkPaint.h> #include <SkSurface.h> +#include <skia_compiler.hxx> #ifdef DBG_UTIL #include <fstream> @@ -109,7 +110,7 @@ static bool isVulkanBlacklisted(const VkPhysicalDeviceProperties& props) CrashReporter::addKeyValue("VulkanDeviceName", OUString::createFromAscii(props.deviceName), CrashReporter::Write); - SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE); + SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE | StreamMode::TRUNC); writeToLog(logFile, "RenderMethod", "vulkan"); writeToLog(logFile, "Vendor", vendorIdStr); writeToLog(logFile, "Device", deviceIdStr); @@ -131,18 +132,10 @@ static bool isVulkanBlacklisted(const VkPhysicalDeviceProperties& props) static void writeSkiaRasterInfo() { - SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE); + SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE | StreamMode::TRUNC); writeToLog(logFile, "RenderMethod", "raster"); // Log compiler, Skia works best when compiled with Clang. -#if defined __clang__ - writeToLog(logFile, "Compiler", "Clang"); -#elif defined __GNUC__ - writeToLog(logFile, "Compiler", "GCC"); -#elif defined _MSC_VER - writeToLog(logFile, "Compiler", "MSVC"); -#else - writeToLog(logFile, "Compiler", "?"); -#endif + writeToLog(logFile, "Compiler", skia_compiler_name()); } static sk_app::VulkanWindowContext::SharedGrContext getTemporaryGrContext(); |