summaryrefslogtreecommitdiff
path: root/vcl/headless/svpgdi.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-12-05 13:09:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-12-05 17:06:00 +0100
commitc2374d702b0e4b7a1828964faa528344a5a9ee17 (patch)
treee2a8453d55e22de884a1dcd4f621c18f55810639 /vcl/headless/svpgdi.cxx
parent1575b46276a44fe0566fec8910188a781589dd75 (diff)
Revert "Compute (un-)premultiply_table at compile time"
This reverts commit 644188bf7f3a07222f2b58a3794348197fb8ad24. It has been found to cause compilation failure ("vcl/source/bitmap/BitmapTools.cxx(1078): error C2131: expression did not evaluate to a constant") with Visual Studio 2017 version 15.9, as discussed in the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2018-December/081500.html> "Windows build failure - C2131: expression did not evaluate to a constant" (and Mike thankfully filed a bug upstream, <https://developercommunity.visualstudio.com/content/problem/398218/ c2131-error-with-stdarray-and-stdmake-integer-sequ.html>). Also, Jenkins node tb39 which runs the "Gerrit Windows" sub-job of Jenkins' "Gerrit for master" job apparently has such a Visual Studio 2017 version 15.9 installed, so keeps failing that job. Change-Id: I87d25863f2e07474fbb2df3c8f72cd2bcc89582e Reviewed-on: https://gerrit.libreoffice.org/64618 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/headless/svpgdi.cxx')
-rw-r--r--vcl/headless/svpgdi.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 0a428545f8b3..0b4bd8d377ea 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1654,7 +1654,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
}
sal_Int32 nStride;
unsigned char *mask_data = aSurface.getBits(nStride);
- vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
+ vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
for (long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
{
unsigned char *row = mask_data + (nStride*y);
@@ -1762,7 +1762,7 @@ Color SvpSalGraphics::getPixel( long nX, long nY )
cairo_destroy(cr);
cairo_surface_flush(target);
- vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
+ vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
unsigned char *data = cairo_image_surface_get_data(target);
sal_uInt8 a = data[SVP_CAIRO_ALPHA];
sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
@@ -2096,9 +2096,8 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons
sal_Int32 nUnscaledExtentsRight = nExtentsRight * m_fScale;
sal_Int32 nUnscaledExtentsTop = nExtentsTop * m_fScale;
sal_Int32 nUnscaledExtentsBottom = nExtentsBottom * m_fScale;
- vcl::bitmap::lookup_table const & unpremultiply_table
- = vcl::bitmap::get_unpremultiply_table();
- vcl::bitmap::lookup_table const & premultiply_table = vcl::bitmap::get_premultiply_table();
+ vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
+ vcl::bitmap::lookup_table premultiply_table = vcl::bitmap::get_premultiply_table();
for (sal_Int32 y = nUnscaledExtentsTop; y < nUnscaledExtentsBottom; ++y)
{
unsigned char *true_row = target_surface_data + (nStride*y);