From b82a2f50548c33bc6727a54e193a2cccaf4e12f7 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 15 Feb 2020 12:47:29 +1100 Subject: Extract image conversion from RGBA to BGRA premultiplied into common function. --- gtk/PlatGTK.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index a319e31ba..2947ffa11 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -601,18 +601,13 @@ void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsi rc.top += (rc.Height() - height) / 2; rc.bottom = rc.top + height; - int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width); + const int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width); const int ucs = stride * height; std::vector image(ucs); - for (int iy=0; iy