summaryrefslogtreecommitdiff
path: root/vcl/osx/salmacos.cxx
AgeCommit message (Collapse)Author
2024-06-25tdf#159175 Do not allocate a CGLayer for each NSWindow when using SkiaPatrick Luby
Skia surfaces can be copied directly to an NSWindow's CGContextRef so disable allocation of a CGLayer for each NSWindow to significantly reduce memory usage when Skia is enabled. Change-Id: I8e3001e4f2ae8dd36156c06db68447c6b1bc67df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169242 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2021-08-23make SalGeometryProvider available for Aqua VCL backendsLuboš Luňák
This is needed for the Skia backend to know the geometry. The Mac Skia code now passes most VCL unittests. Change-Id: I6e35764d95ce821d8e11ed9979e5be75bcf6ff49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120806 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-23first WIP version of mac skia SalGraphics backendLuboš Luňák
It doesn't yet blit to screen, but the basics should be there. Change-Id: I0f77b66756f578d84d0cee16cda00e7a2fea714f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120805 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-22tdf#142061 Add window scaling to XOR emulation on macOSThorsten Wagner
Window scaling for retina displays on macOS has been added to fix tdf#138122 in commit 1a167625314bf36b735176ed488e6ba9b5e9b675 Missing window scaling for XOR emulation is added by this change. Code modified for macOS is moved from quartz/salgidcommon.cxx to osx/salmacos.cxx while original code is copied to ios/salios.cxx to prevent modifications for iOS. Change-Id: Ia8c52f9045379cc37d5aff1279650db0dddee8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115816 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-30vcl: iOS/macOS - move graphic render func. into AquaGraphicsBackendTomaž Vajngerl
This change moves graphic rendering function under AquaSalGraphics into a new AquaGraphicsBackend, which inherits from SalGraphicsImpl. This is part of the refactoring to make it mandatory that a SalGraphics always has a SalGraphicsImpl associated, which will make it possible to simplify the SalGraphics interface and enable the posibility to implement alernative graphic backends (Skia). Common variables and attributes are moved to AquaSharedAttributes and are shared between SalGraphics and SalGraphicsImpl. Change-Id: Ie48da87002ec8e4011ba92fdc9170f3a86761517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114701 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-23tdf#138122 Detect window scaling for multi display configurations on macOSThorsten Wagner
(1) Activate window scaling when at least one retina display is connected (2) Remove environment variable VCL_MACOS_FORCE_WINDOW_SCALING (3) Disable related unit tests unless bitmap scaling has been implemented Change-Id: I218119a21e319e22bf17c609608724fce180f000 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111267 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-28Revert "tdf#138122 Detect window scaling for multi display configurations on ↵Stephan Bergmann
macOS" This reverts commit f318b856ed055f1952276355f811153f6b29c93e. It appears this reliably causes CppunitTest_vcl_backend_test to fail on macOS on at least tb69, see e.g. <https://ci.libreoffice.org/job/gerrit_mac/82587/ consoleFull#-500134232d893063f-7f3d-4b7e-b56f-4e0f225817cd> and <https://ci.libreoffice.org/job/gerrit_mac/82592/ consoleFull#-500134232d893063f-7f3d-4b7e-b56f-4e0f225817cd>, [_RUN_____] BackendTest::testDrawBlendExtended /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/vcl/qa/cppunit/BackendTest.cxx:688:BackendTest::testDrawBlendExtended equality assertion failed - Expected: c[000080ff] - Actual : c[ffffffff] BackendTest::testDrawBlendExtended finished in: 1ms [_RUN_____] BackendTest::testDrawAlphaBitmapMirrored /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/vcl/qa/cppunit/BackendTest.cxx:749:BackendTest::testDrawAlphaBitmapMirrored equality assertion failed - Expected: c[ff0000ff] - Actual : c[000000ff] BackendTest::testDrawAlphaBitmapMirrored finished in: 1ms [_RUN_____] BackendTest::testTdf124848 /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/vcl/qa/cppunit/BackendTest.cxx:808:BackendTest::testTdf124848 equality assertion failed - Expected: c[000000ff] - Actual : c[ffffffff] And it also causes my local macOS 11.1 ARM64 build to consistently fail that way, both the original patch set 1 (with the older parent) and the submitted patch set 2 (with a newer parent). Change-Id: I2c36fada271e8bc300b6caa19370d8e8bb1e7599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110055 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins
2021-01-27tdf#138122 Detect window scaling for multi display configurations on macOSThorsten Wagner
(1) Activate window scaling when at least one retina display is connected (2) Remove environment variable VCL_MACOS_FORCE_WINDOW_SCALING Change-Id: If6926ace7238f2be4ae91290872dbb3dbf658221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110002 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-20Fix typosAndrea Gelmini
Change-Id: I8bab3efcd63c0f950bc3176e0d26cc896d601083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109559 Tested-by: Jenkins Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-19-Werror,-Wdeprecated-anon-enum-enum-conversionStephan Bergmann
same as f9c6a153c95c4acc6ba02e660c6ca51166b4c79a "-Werror,-Wdeprecated-anon-enum-enum-conversion" Change-Id: Ie69413a98269c215eaf2cbd938708f0d9fcf28d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109614 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-18Clean up includes a bit for iOS and macOSTor Lillqvist
Change-Id: I1dc6256968503ee3865f90e3693acce911a1d65c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109485 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-17tdf#138122: Fix vcl for iOS after 1a167625314bf36b735176ed488e6ba9b5e9b675Tor Lillqvist
Make vcl compile again for iOS and make the Collabora Office iOS app work again when built against a master build of core. For now, keep the old versions of the functions touched by 1a167625314bf36b735176ed488e6ba9b5e9b675 in vcl/ios/salios.cxx, and move the modified versions to the new file vcl/osx/salmacos.cxx. Keep the functions as they were except that ifdefs for MACOSX or IOS are expanded. Keep the formatting as it was to make comparisons easier. Thus add the new files to the clang-format exclusion list. While at it, also move vcl/quartz/salgdiutils.cxx to vcl/osx as it is compiled only for macOS anyway. Change-Id: I990ef678f2263031d4a5af8cc547fffe185d17c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109480 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>