From 2b82a4c14d8e8c8686a8b2d38abdc0df259e087c Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Fri, 22 May 2009 09:00:24 -0400 Subject: [PATCH] Add a 64 bit pixel fetcher and use it for solid colors --- pixman/pixman-bits-image.c | 9 +++++---- pixman/pixman-private.h | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index cebb2ea..6bfcf2b 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -120,7 +120,7 @@ bits_image_fetch_raw_pixels (bits_image_t *image, uint32_t *buffer, int n_pixels if (x == 0xffffffff || y == 0xffffffff) buffer[i] = 0; else - buffer[i] = image->fetch_pixel (image, x, y); + buffer[i] = image->fetch_pixel_32 (image, x, y); } } @@ -651,7 +651,7 @@ bits_image_fetch_solid_32 (bits_image_t * image, uint32_t color; uint32_t *end; - color = image->fetch_pixel (image, 0, 0); + color = image->fetch_pixel_32 (image, 0, 0); end = buffer + width; while (buffer < end) @@ -666,7 +666,7 @@ bits_image_fetch_solid_64 (bits_image_t * image, uint64_t color; uint64_t *end; - color = image->fetch_pixel (image, 0, 0); + color = image->fetch_pixel_64 (image, 0, 0); end = buffer + width; while (buffer < end) @@ -737,7 +737,8 @@ bits_image_property_changed (pixman_image_t *image) bits->fetch_scanline_raw_64 = READ_ACCESS(pixman_fetchProcForPicture64)(bits); - bits->fetch_pixel = READ_ACCESS(pixman_fetchPixelProcForPicture32)(bits); + bits->fetch_pixel_32 = READ_ACCESS(pixman_fetchPixelProcForPicture32)(bits); + bits->fetch_pixel_64 = READ_ACCESS(pixman_fetchPixelProcForPicture64)(bits); } static uint32_t * diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 62ad702..3c84040 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -379,8 +379,9 @@ struct bits_image uint32_t * free_me; int rowstride; /* in number of uint32_t's */ - fetchPixelProc32 fetch_pixel; - + fetchPixelProc32 fetch_pixel_32; + fetchPixelProc64 fetch_pixel_64; + scanStoreProc store_scanline_32; scanStoreProc store_scanline_64; -- 2.7.4