summaryrefslogtreecommitdiff
path: root/vcl/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-06-25 10:35:00 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-06-25 16:16:49 +0200
commit2eeb6822110205f76eb908b5900526723cc8007c (patch)
tree87e59aa1682217154cbeea48203e125bdf146b5f /vcl/skia
parentc3f8702241b625db994bcb059d8c91c25fd43e53 (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>
Diffstat (limited to 'vcl/skia')
-rw-r--r--vcl/skia/SkiaHelper.cxx15
1 files changed, 4 insertions, 11 deletions
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();