[librsvg] Remove unexported/unused rsvg_cairo_to_pixbuf()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Remove unexported/unused rsvg_cairo_to_pixbuf()
- Date: Fri, 9 Mar 2018 22:27:16 +0000 (UTC)
commit 2bf8da430bfdf4aa394edd9f2af7636e7f2a3bb3
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Mar 9 15:46:10 2018 -0600
Remove unexported/unused rsvg_cairo_to_pixbuf()
librsvg/rsvg-cairo-draw.c | 31 -------------------------------
1 file changed, 31 deletions(-)
---
diff --git a/librsvg/rsvg-cairo-draw.c b/librsvg/rsvg-cairo-draw.c
index 9555e9a7..4b107fae 100644
--- a/librsvg/rsvg-cairo-draw.c
+++ b/librsvg/rsvg-cairo-draw.c
@@ -1058,34 +1058,3 @@ rsvg_cairo_surface_to_pixbuf (cairo_surface_t *surface)
return dest;
}
-
-/* This is unused but still exists for ABI compat. See bug #666868. */
-void rsvg_cairo_to_pixbuf (guint8 * pixels, int rowstride, int height);
-
-void
-rsvg_cairo_to_pixbuf (guint8 * pixels, int rowstride, int height)
-{
- int row;
- /* un-premultiply data */
- for (row = 0; row < height; row++) {
- guint8 *row_data = (pixels + (row * rowstride));
- int i;
-
- for (i = 0; i < rowstride; i += 4) {
- guint8 *b = &row_data[i];
- guint32 pixel;
- guint8 alpha;
-
- memcpy (&pixel, b, sizeof (guint32));
- alpha = (pixel & 0xff000000) >> 24;
- if (alpha == 0) {
- b[0] = b[1] = b[2] = b[3] = 0;
- } else {
- b[0] = (((pixel & 0xff0000) >> 16) * 255 + alpha / 2) / alpha;
- b[1] = (((pixel & 0x00ff00) >> 8) * 255 + alpha / 2) / alpha;
- b[2] = (((pixel & 0x0000ff) >> 0) * 255 + alpha / 2) / alpha;
- b[3] = alpha;
- }
- }
- }
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]