https://bugs.documentfoundation.org/show_bug.cgi?id=163945
--- Comment #20 from Patrick (volunteer) <[email protected]> --- (In reply to Seb from comment #19) > 2. It turns out I had 'Force Skia Software rendering' enabled in my non-Dev > LibreOffice settings (probably left over from working around #157312). > Turning that off also introduces the laggy selection refreshing in 24.8.3.2. That's interesting. I would've never guessed that Skia/Raster would be more responsive than Skia/Metal. Given this new piece of data, I no longer think this is a bug in LibreOffice internal painting timers. After all, LibreOffice uses the same drawing code and paint timers for both Skia/Metal and Skia/Raster. So here's my new theory: Google's Skia/Metal code doesn't copy pixels to the screen as frequently as Skia/Raster. When I get some time, I'll try to dig down into Google's Skia code and look at how Skia/Metal copies pixels to the screen. Some background about LibreOffice and Skia: the LibreOffice paint timers do all their drawing to an offscreen image in memory. Then, LibreOffice waits for macOS to invoke a callback function that copies the pixels in the offscreen image to the native window. This two step process is necessary because it is only safe to draw to a native window when the callback function is invoked by macOS. Drawing to a native window any other time usually leads to a crash and/or erratic window behavior. I know that when using Skia/Raster or Skia disabled, macOS calls LibreOffice's -[SalFrameView drawRect:] function. But it appears that that function never gets called when using Skia/Metal. So, when I get some time, I'll dive into Google's Skia/Metal code and see if I can figure what what function macOS calls when it is safe to copy the pixels to the native window. I suspect that the callback function is somewhere in the Skia/Metal code but I don't know. Hopefully, if I can find the Skia/Metal callback function, I can then see if we can tell macOS to run this callback more frequently. Right now, LibreOffice calls -[SalFrameView setNeedsDisplayInRect:] to tell macOS that it wants to copy pixels to the native window. This seems to be enough for Skia/Raster and Skia disabled, but maybe this has no effect when using Skia/Meta. -- You are receiving this mail because: You are the assignee for the bug.
