sc/source/core/tool/token.cxx | 25 +++++++++++++++---------- vcl/source/gdi/bmpacc.cxx | 1 - 2 files changed, 15 insertions(+), 11 deletions(-)
New commits: commit 7f19b2fae3771995b48246ef23ffe0df123e1a7e Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Jun 12 13:20:10 2018 +0200 remove incorrect SAL_WARN in BitmapInfoAccess::BitmapInfoAccess just because use_count is > 2, doesn't mean we have two simultaneous writes, could be 2 readers and a writer Change-Id: Ife7fc91ff2e597e6bb847460f46bdde954e63e4f Reviewed-on: https://gerrit.libreoffice.org/55695 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index bbdecd69be23..b0e6f331b122 100644 --- a/vcl/source/gdi/bmpacc.cxx +++ b/vcl/source/gdi/bmpacc.cxx @@ -41,7 +41,6 @@ BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) : if( mnAccessMode == BitmapAccessMode::Write && xImpBmp.use_count() > 2 ) { - SAL_WARN( "vcl", "two code paths trying to write to same underlying Bitmap" ); xImpBmp.reset(); rBitmap.ImplMakeUnique(); xImpBmp = rBitmap.ImplGetSalBitmap(); commit fb4ad5b0c766440e1a47d991c6cbc9cb017ada59 Author: Luboš Luňák <l.lu...@collabora.com> Date: Tue Jun 12 13:03:09 2018 +0200 do not even consider ScTokenArray for OpenCL if it's disabled If sc/qa/unit/data/ods/functions.ods is run with OpenCL disabled (and the mnOpenCLMinimumFormulaGroupSize check disabled too), then ScTokenArray::CheckToken() considers the token for OpenCL, and if the token is ocExternal, it passes all the related OpenCL checks, and thus ScTokenArray::CheckForThreading() is never called. However, since OpenCL is disabled, then actually the threaded code will be executed, since the blacklisting for ocExternal has not been done. Change-Id: Ib4d4d63d3925746f6e13da0611ac869e9a094b5b Reviewed-on: https://gerrit.libreoffice.org/55676 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index ac4fed165b87..d60172b1cb0d 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1820,9 +1820,18 @@ void ScTokenArray::GenHash() void ScTokenArray::ResetVectorState() { - meVectorState = FormulaVectorEnabled; - mbOpenCLEnabled = true; - mbThreadingEnabled = !ScCalcConfig::isOpenCLEnabled() && ScCalcConfig::isThreadingEnabled(); + if(ScCalcConfig::isOpenCLEnabled()) + { + meVectorState = FormulaVectorEnabled; + mbOpenCLEnabled = true; + mbThreadingEnabled = false; + } + else + { + meVectorState = FormulaVectorDisabled; + mbOpenCLEnabled = false; + mbThreadingEnabled = ScCalcConfig::isThreadingEnabled(); + } } bool ScTokenArray::IsFormulaVectorDisabled() const @@ -1888,11 +1897,9 @@ bool ScTokenArray::IsValidReference( ScRange& rRange, const ScAddress& rPos ) co ScTokenArray::ScTokenArray() : FormulaTokenArray(), - mnHashValue(0), - meVectorState(FormulaVectorEnabled), - mbOpenCLEnabled(true), - mbThreadingEnabled(!ScCalcConfig::isOpenCLEnabled() && ScCalcConfig::isThreadingEnabled()) + mnHashValue(0) { + ResetVectorState(); } ScTokenArray::~ScTokenArray() @@ -1930,9 +1937,7 @@ bool ScTokenArray::EqualTokens( const ScTokenArray* pArr2) const void ScTokenArray::Clear() { mnHashValue = 0; - meVectorState = FormulaVectorEnabled; - mbOpenCLEnabled = true; - mbThreadingEnabled = !ScCalcConfig::isOpenCLEnabled() && ScCalcConfig::isThreadingEnabled(); + ResetVectorState(); FormulaTokenArray::Clear(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits