office-gobmx/vcl/inc
Patrick Luby 0807fe3628 Improve rendering speed for native controls when using Skia/Metal
While debugging tdf#163945, Xcode's Instruments application uncovered
the following performance bottlenecks when using Skia/Metal:

1. Very slow rendering an NSBox:
   Many system colors have the NSColorTypeCatalog color type. For
   some unkown reason, setting the NSBox's fill color to a color set
   to NSColorTypeCatalog causes drawing to take at least twice as
   long as when the fill color is set to NSColorTypeComponentBased.
   So, only draw with a fill color set to NSColorTypeComponentBased.

2. Excessively large offscreen buffers when drawing native controls:
   The temporary bitmap was set to the control region expanded by
   50 * mScaling (e.g. both width and height were increased by 200
   pixels when running on a Retina display). This caused temporary
   bitmaps to be up to several times larger than needed. Also,
   drawing NSBox objects to a CGBitmapContext is noticeably slow
   so filling all that unneeded temporary bitmap area can slow down
   performance when a large number of NSBox objects like the status
   bar are redrawn in quick succession.
   Using getNativeControlRegion() isn't perfect, but it does try to
   account for the focus ring as well as the minimum width and/or
   height of the native control so union the two regions set by
   getNativeControlRegion() and add double the focus ring width on
   each side just to be safe. In most cases, this should ensure
   that the temporary bitmap is large enough to draw the entire
   native control and a focus ring.

3. Unncessary copying of bitmap buffer when drawing native controls:
   Let Skia own the CGBitmapContext's buffer so that an SkImage
   can be created without Skia making a copy of the buffer.

Change-Id: Ibd3abb4b9d7045c47268319772fe97a5c4dba3c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177225
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-11-25 19:30:21 +01:00
..
android
animate
bitmap tdf#143148 Replace include guards with #pragma once in header files 2024-10-27 11:17:06 +01:00
filter
font tdf#36709 sw: Writer layout for font-relative first-line indent 2024-11-13 09:35:20 +01:00
graphic
headless use default implementation for drawEPS 2024-11-21 13:11:04 +01:00
ios
jsdialog improve loplugin passparamsbyref 2024-11-19 07:46:25 +01:00
opengl
osx Set the native tracking area in -[SalFrameView updateTrackingAreas] 2024-10-28 15:06:07 +01:00
pch Let ESelection use EPaM for simplification 2024-11-24 08:12:55 +01:00
pdf pdf: Introduce a IPDFEncryptor and use it in PDFWriterImpl 2024-11-25 08:25:53 +01:00
qt5 tdf#130857 qt weld: Notify about Expander state change 2024-11-24 17:05:02 +01:00
qt6 tdf#130857 qt weld: Add QtInstanceExpander 2024-11-24 17:04:48 +01:00
quartz Improve rendering speed for native controls when using Skia/Metal 2024-11-25 19:30:21 +01:00
skia use default implementation for drawEPS 2024-11-21 13:11:04 +01:00
test
unx loplugin:unusedmethods 2024-11-22 20:03:48 +01:00
widgetdraw
win win: Prefer integers instead of strings for OS version comparison 2024-11-06 14:06:27 +01:00
accel.hxx
accmgr.hxx
bitmaps.hlst
BitmapSymmetryCheck.hxx
brdwin.hxx
bubblewindow.hxx
calendar.hxx
canvasbitmap.hxx
configsettings.hxx
ContextVBox.hxx
ControlCacheKey.hxx
cursor_hotspots.hxx
dbggui.hxx
debugevent.hxx
displayconnectiondispatch.hxx
dndeventdispatcher.hxx
dndhelper.hxx
dndlistenercontainer.hxx
drawmode.hxx
driverblocklist.hxx
DropdownBox.hxx
factory.hxx
FileDefinitionWidgetDraw.hxx
fltcall.hxx
fontattributes.hxx
fontsubset.hxx
glyphid.hxx
helpwin.hxx
hyperlabel.hxx
IconThemeScanner.hxx
IconThemeSelector.hxx Libreoffice Theme Part 1.0: Make registry colors accessible from VCL 2024-11-06 20:49:31 +01:00
iconview.hxx
image.h
imagerepository.hxx
impdel.hxx
impfont.hxx
impfontcache.hxx
impfontcharmap.hxx
impglyphitem.hxx
impgraph.hxx
implimagetree.hxx
ImplLayoutArgs.hxx
ImplLayoutRuns.hxx
ImplOutDevData.hxx
IPrioritable.hxx
jobdata.hxx
jobset.h
justificationdata.hxx
langboost.hxx
listbox.hxx
managedmenubutton.hxx
menubarvalue.hxx
menutogglebutton.hxx
messagedialog.hxx
NotebookbarPopup.hxx
OptionalBox.hxx
ppdparser.hxx loplugin:passstuffbyref in vcl 2024-11-06 12:34:18 +01:00
print.h
print.hrc
printaccessoryview.hrc
printdlg.hxx
printerinfomanager.hxx
PriorityHBox.hxx notebookbar: Drop PriorityHBox::GetHiddenCount 2024-11-22 00:16:01 +01:00
PriorityMergedHBox.hxx notebookbar: Simplify logic to detect whether hidden children 2024-11-22 00:16:11 +01:00
regband.hxx
regionband.hxx
ResampleKernel.hxx
salbmp.hxx
salframe.hxx loplugin:unusedmethods 2024-11-22 20:03:48 +01:00
salgdi.hxx use default implementation for drawEPS 2024-11-21 13:11:04 +01:00
salgdiimpl.hxx use default implementation for drawEPS 2024-11-21 13:11:04 +01:00
salgeom.hxx
SalGradient.hxx
salinst.hxx
sallayout.hxx tdf#163215: Enable kashida justification for AAT fonts 2024-10-18 21:49:03 +02:00
salmenu.hxx
salobj.hxx
salprn.hxx
salptype.hxx
salsession.hxx
salsys.hxx
saltimer.hxx
salusereventlist.hxx
salvd.hxx
salvtables.hxx tdf#130857 weld: Move Window::set_centered_on_parent to Dialog 2024-11-24 17:04:11 +01:00
salwtype.hxx
scanlinewriter.hxx
schedulerimpl.hxx
scrptrun.h
scrwnd.hxx tdf#163582: Fix scrolling distance increasing geometrically. 2024-10-30 15:04:17 +01:00
sft.hxx
slider.hxx
spin.hxx
strhelper.hxx
strings.hrc
strings.hxx
svdata.hxx tdf#163764 Force pending timers to run after marked text changes 2024-11-11 01:17:25 +01:00
svimpbox.hxx
svsys.h
textlayout.hxx
TextLayoutCache.hxx
textlineinfo.hxx
textrender.hxx
toolbarvalue.hxx
toolbox.h
treeglue.hxx
uiobject-internal.hxx
units.hrc tdf#36709 GUI changes for font-relative first-line indent 2024-11-14 17:30:06 +01:00
vcleventlisteners.hxx
vclpluginapi.h
vclstatuslistener.hxx no need to take a copy of the getProcessComponentContext return value 2024-11-08 15:23:52 +01:00
verticaltabctrl.hxx
watchdog.hxx
WidgetDrawInterface.hxx
window.h
windowdev.hxx
wizdlg.hxx