This is code for using the Skia library as a drawing library in VCL backends. See external/skia for info on the library itself. Environment variables: ====================== See README.vars in the toplevel vcl/ directory. Note that many backends do not use Skia. E.g. on Linux it is necessary to also use SAL_USE_VCLPLUGIN=gen . There are also GUI options for controlling whether Skia is enabled. Skia drawing methods: ===================== Skia supports several methods to draw: - Raster - CPU-based drawing (here primarily used for debugging) - Vulkan - Vulkan-based GPU drawing, this is the default 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 Thread safety: ============== SolarMutex must be held for most operations (asserted in SkiaSalGraphicsImpl::preDraw() and in SkiaZone constructor). The reason for this is that this restriction does not appear to be a problem, so there's no need to verify thread safety of the code (including the Skia library). There's probably no fundamental reason why the code couldn't be made thread-safe. GrDirectContext sharing: ======================== We use Skia's sk_app::WindowContext class for creating surfaces for windows, that class takes care of the internals. But of offscreen drawing, we need an instance of class GrDirectContext. There is sk_app::WindowContext::getGrDirectContext(), but each instance creates its own GrDirectContext, and apparently it does not work to mix them. Which means that for offscreen drawing we would need to know which window (and only that window) the contents will be eventually painted to, which is not possible (it may not even be known at the time). To solve this problem we patch sk_app::WindowContext to create just one GrDirectContext object and share it between instances. Additionally, using sk_app::WindowContext::SharedGrDirectContext it is possible to share it also for offscreen drawing, including keeping proper reference count. value='distro/collabora/co-24.04.8'>distro/collabora/co-24.04.8 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/svtools/uiconfig
AgeCommit message (Expand)Author
2020-10-22set all .ui min require version of gtk to 3.20Caolán McNamara
2020-09-10remove image_position top from GtkButtonandreas kainz
2020-09-02weld TabBarEditCaolán McNamara
2020-08-24restore translatable="no"Caolán McNamara
2020-08-24tdf#118148 Extended tips from HC2/shared/Olivier Hallot
2020-08-10tdf#135529 today/none only used by DateControlCaolán McNamara
2020-07-21weld DateControlCaolán McNamara
2020-07-12weld CheckBoxControlCaolán McNamara
2020-07-10weld MultiLineTextCellCaolán McNamara
2020-07-08let spinbutton stretch to fill areaCaolán McNamara
2020-07-07let browsebox entry stretch to fit allocated spaceCaolán McNamara
2020-07-06weld DbNumericField itemCaolán McNamara
2020-07-03RESTART_REASON_OPENGL is deadNoel Grandin
2020-07-01weld EditControl for browseboxCaolán McNamara
2020-06-26weld FixedTextControlCaolán McNamara
2020-06-26weld FixedImageControlCaolán McNamara
2020-06-26weld SpinfieldControlCaolán McNamara
2020-06-21weld DateField Calendar floating windowCaolán McNamara
2020-06-07tdf#129537 call it none_line_button not none_color_buttonCaolán McNamara
2020-06-06tdf#129537 duplicate context in two different modulesCaolán McNamara
2020-04-23weld ListBoxControlCaolán McNamara
2020-04-23weld ComboBoxControlCaolán McNamara
2020-04-22weld EditControlCaolán McNamara
2020-01-24Revert "lok: ui: more files to increase the 'step-increment'"Miklos Vajna
2020-01-23lok: ui: more files to increase the 'step-increment'Henry Castro
2019-11-27add GUI and configuration options for SkiaLuboš Luňák
2019-09-20make WizardShell use RoadmapWizardMachineCaolán McNamara
2019-09-18The menu is called 'Form', not 'Forms'Andras Timar
2019-09-15ditch wizarddialog.ui nowCaolán McNamara
2019-07-16tdf#126232 - Button "Address Data Source..." should be renamedHeiko Tietze
2019-05-28Fix domain in ui files (sfx2, svtools)Julien Nabet
2019-05-18remove remaining '0' responsesCaolán McNamara
2019-04-04tdf#124323: show restart dialog when toggling multi-threaded...Xisco Fauli
2019-03-24Make some .ui strings translatable / not translatableGabor Kelemen
2019-03-02weld AddressBookSourceDialogCaolán McNamara
2019-02-27tdf#123693 raise max sizeCaolán McNamara
2019-02-16MSForms: Show restart dialog when MS compatible Forms menu setting is changedTamás Zolnai
2019-02-15weld ScDPDateGroupDlgCaolán McNamara