diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-12-02 16:50:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-12-03 07:53:30 +0100 |
commit | 644188bf7f3a07222f2b58a3794348197fb8ad24 (patch) | |
tree | ff32e70e51353951e9b7dd07fc26a1d41b258038 /vcl/headless | |
parent | 1ee8d4f63adf3113a4733a479c8faf9eb65f7b8d (diff) |
Compute (un-)premultiply_table at compile time
Change-Id: I34e624fcd5d11d02c26e775f5acdddec1fca9d87
Reviewed-on: https://gerrit.libreoffice.org/64428
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index c936b0e1cbbe..848d2e0f2b04 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 unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); + vcl::bitmap::lookup_table const & 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 unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); + vcl::bitmap::lookup_table const & 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,8 +2096,9 @@ 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 unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); - vcl::bitmap::lookup_table premultiply_table = vcl::bitmap::get_premultiply_table(); + vcl::bitmap::lookup_table const & unpremultiply_table + = vcl::bitmap::get_unpremultiply_table(); + vcl::bitmap::lookup_table const & premultiply_table = vcl::bitmap::get_premultiply_table(); for (sal_Int32 y = nUnscaledExtentsTop; y < nUnscaledExtentsBottom; ++y) { unsigned char *true_row = target_surface_data + (nStride*y); |