[Libreoffice-commits] core.git: external/skia vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 22 11:31:59 UTC 2020
external/skia/README | 10 ++++++++--
vcl/skia/README | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 2 deletions(-)
New commits:
commit bb4b538ff6c2b10d41784819224171df07910eaf
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri May 22 21:13:14 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Jun 22 13:31:20 2020 +0200
add debugging hints to Skia README
Change-Id: I32d9a8bf19cbff709c088c0e0a1d4830e877e88d
diff --git a/external/skia/README b/external/skia/README
index ccd1be1519a9..bf59a2384612 100644
--- a/external/skia/README
+++ b/external/skia/README
@@ -21,7 +21,13 @@ And review differences for BUILD.gn and relevant files in gn/ :
git diff chrome/mYY..chrome/mXX ./BUILD.gn ./gn
-GrContext sharing
-=================
+Debugging Skia:
+===============
+
+Note that Skia is always built optimized, unless you use --enable-skia=debug.
+
+
+GrContext sharing:
+==================
For details about the share-grcontext patch, see vcl/skia/README.
diff --git a/vcl/skia/README b/vcl/skia/README
index f1248d90c3ea..c2077c5f0c25 100644
--- a/vcl/skia/README
+++ b/vcl/skia/README
@@ -18,6 +18,47 @@ Skia supports several methods to draw:
There are more (OpenGL, Metal on Mac, etc.), but (as of now) they are not supported by VCL.
+Logging:
+========
+
+Run LO with 'SAL_LOG=+INFO.vcl.skia' to get log information about Skia including
+tracing each drawing operation. If you want log information without drawing operations,
+use 'SAL_LOG=+INFO.vcl.skia-INFO.vcl.skia.trace'.
+
+Debugging:
+==========
+
+Both SkiaSalBitmap and SkiaSalGraphicsImpl have a dump() method that writes a PNG
+with the current contents. There is also SkiaHelper::dump() for dumping contents
+of SkBitmap, SkImage and SkSurface.
+
+If there is a drawing problem, you can use something like the following piece of code
+to dump an image after each relevant operation (or do it in postDraw() if you don't
+know which operation is responsible). You can then find the relevant image
+and match it with the responsible operation (run LO with 'SAL_LOG=+INFO.vcl.skia').
+
+ static int cnt = 0;
+ ++cnt;
+ char buf[100];
+ sprintf(buf,"/tmp/a%05d.png", cnt);
+ SAL_DEBUG("CNT:" << cnt);
+ if(cnt > 4000) // skip some initial drawing operations
+ dump(buf);
+
+
+Testing:
+========
+
+Currently unittests always use the 'headless' VCL backend. Use something like the following
+to run VCL unittests with Skia (and possibly skip slowcheck):
+
+SAL_SKIA=raster SAL_ENABLESKIA=1 SAL_USE_VCLPLUGIN=gen make vcl.build vcl.unitcheck vcl.slowcheck
+
+You can also use 'visualbackendtest' to visually check some operations. Use something like:
+
+SAL_SKIA=raster SAL_ENABLESKIA=1 SAL_USE_VCLPLUGIN=gen [srcdir]/bin/run visualbackendtest
+
+
GrContext sharing:
==================
More information about the Libreoffice-commits
mailing list