/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX #define INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX #include #include #include "ByteChucker.hxx" #include #include #include #include struct ZipEntry; class ZipOutputEntry; class ZipOutputEntryInThread; class ZipPackageStream; class ZipOutputStream { css::uno::Reference< css::io::XOutputStream > m_xStream; ::std::vector < ZipEntry * > m_aZipList; std::shared_ptr mpThreadTaskTag; ByteChucker m_aChucker; ZipEntry *m_pCurrentEntry; std::vector< ZipOutputEntryInThread* > m_aEntries; std::exception_ptr m_aDeflateException; public: ZipOutputStream( const css::uno::Reference< css::io::XOutputStream > &xOStream ); ~ZipOutputStream(); void addDeflatingThreadTask( ZipOutputEntryInThread *pEntry, std::unique_ptr pThreadTask ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeLOC( ZipEntry *pEntry, bool bEncrypt = false ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void rawWrite( const css::uno::Sequence< sal_Int8 >& rBuffer ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void rawCloseEntry( bool bEncrypt = false ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void finish(); const css::uno::Reference< css::io::XOutputStream >& getStream() const; static sal_uInt32 getCurrentDosTime(); static void setEntry( ZipEntry *pEntry ); private: /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeEND(sal_uInt32 nOffset, sal_uInt32 nLength); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeCEN( const ZipEntry &rEntry ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeDataDescriptor( const ZipEntry &rEntry ); void writeExtraFields( const ZipEntry& rEntry ); // ScheduledThread handling helpers void consumeScheduledThreadTaskEntry(std::unique_ptr pCandidate); void consumeFinishedScheduledThreadTaskEntries(); public: void reduceScheduledThreadTasksToGivenNumberOrLess( std::size_t nThreadTasks); const std::shared_ptr& getThreadTaskTag() const { return mpThreadTaskTag; } }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ distro/collabora/cp-4.1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-03-22 09:54:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-03-28 14:31:07 +0200
commit8a734ba9287f8d25c3c3df50b4efc91b9035127d (patch)
tree14f9afd88331d88ef809a8c9c8e282a613f0e844 /bin/distro-install-clean-up
parent6b147d3369ece427e490d3108de6ec9f7448c570 (diff)
Drop support for OpenGL denylist on X11
...which appears to have become even less relevant with db89f53c31af997b9bf422b0e784afba8d62a42e "remove OpenGL VCL backend code". And the vcl/unx/glxtest.cxx machinery that it is based on is (a) known to cause issues like <https://gitlab.freedesktop.org/mesa/mesa/-/issues/3957> "LibreOffice's OpenGL version detection code hangs when running inside a flatpak container with a different mesa version", and (b) is one of the two reasons why an soffice that uses Wayland nevertheless also requires Xwayland during startup (the other reason being oosplash). So getting rid of the glxtest machinery is beneficial. The remaining two potential uses of OpenGL on X11/Wayland are the obscure css.rendering.SpriteCanvas.OGL service implementation (about which db89f53c31af997b9bf422b0e784afba8d62a42e states that "it seems has never been finished or enabled (or so it most probably should be dumped too)") and some slideshow transitions. About the latter, Caolán stated on IRC: "I think we grew this set of stuff to check for dodgy opengl primarily for the case where vcl used opengl for ordinary UI optimizations; but I think that use is gone now so I wonder does it make sense to just drop all of that entirely; for just slide transitions we apparently survived fine without the denylist for ages". (And in any case there is still the WatchdogThread support with OpenGLZone::hardDisable in VCLExceptionSignal_impl, vcl/source/app/svmain.cxx, should any OpenGL code run into problems.) (The removal of gb_LinkTarget_use_glxtest from gb_LinkTarget_use_vclmain, which indirectly brought in gb_LinkTarget_use_libraries,*,vcl, revealed that an explicit use of vcl was missing from various Executables etc., which thus had to be added now.) Change-Id: Ifa5220fd09910a4459ca546d9655e479a2e38f1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131943 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bin/distro-install-clean-up')