From 4e5f6f01a1b8dfd2dc07f760e79a0ced6d4836a5 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 15 Feb 2020 12:47:29 +1100 Subject: Backport: Extract image conversion from RGBA to BGRA premultiplied into common function. Backport of changeset 7987:beeac488af4d. --- 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 97009d4ff..f884ac565 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -597,18 +597,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