This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via fad5c36eca3675087d21df061b8994f6865299f8 (commit) via 4999384b7137ca992be35c87855121fe5f3e4982 (commit) from 83ea42ee07c41ffa84e4af2cc12dad89d8eb7096 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/fad5c36eca3675087d21df061b8994f686529...
commit fad5c36eca3675087d21df061b8994f6865299f8 Author: Cyril Hrubis metan@ucw.cz Date: Sat Jan 29 09:23:44 2000 +0000
Use at least _Raw get/put pixel in naive blit.
diff --git a/libs/core/GP_Blit.c b/libs/core/GP_Blit.c index ced7d54..1aa1e7e 100644 --- a/libs/core/GP_Blit.c +++ b/libs/core/GP_Blit.c @@ -67,9 +67,9 @@ void GP_Blit_Naive(const GP_Context *c1, GP_Coord x1, GP_Coord y1, GP_Size w, GP
for (i = 0; i < w; i++) for (j = 0; j < h; j++) { - GP_Pixel p = GP_GetPixel(c1, x1 + i, y1 + j); + GP_Pixel p = GP_GetPixel_Raw(c1, x1 + i, y1 + j); if (c1->pixel_type != c2->pixel_type) p = GP_ConvertContextPixel(p, c1, c2); - GP_PutPixel(c2, x2 + i, y2 + j, p); + GP_PutPixel_Raw(c2, x2 + i, y2 + j, p); } }
http://repo.or.cz/w/gfxprim.git/commit/4999384b7137ca992be35c87855121fe5f3e4...
commit 4999384b7137ca992be35c87855121fe5f3e4982 Author: Cyril Hrubis metan@ucw.cz Date: Sat Jan 29 09:22:09 2000 +0000
Reset the framebuffer on ctrl+c.
diff --git a/demos/fbshow/fbshow.c b/demos/fbshow/fbshow.c index ffa2c6a..3b8fb50 100644 --- a/demos/fbshow/fbshow.c +++ b/demos/fbshow/fbshow.c @@ -26,6 +26,7 @@
*/
+#include <signal.h> #include <unistd.h>
#include <GP.h> @@ -35,6 +36,17 @@ static GP_Pixel black_pixel; static GP_Pixel white_pixel;
+ +static GP_Framebuffer *fb = NULL; + +static void sighandler(int signo __attribute__((unused))) +{ + if (fb != NULL) + GP_FramebufferExit(fb); + + exit(1); +} + static float calc_img_size(uint32_t img_w, uint32_t img_h, uint32_t src_w, uint32_t src_h) { @@ -48,6 +60,8 @@ static GP_Context *image_to_display(GP_Context *img, uint32_t w, uint32_t h) { float rat = calc_img_size(img->w, img->h, w, h);
+// GP_FilterGaussianBlur(img, img, 1, 1, NULL); + return GP_FilterResize(img, NULL, GP_INTERP_CUBIC, img->w * rat, img->h * rat, NULL); }
@@ -87,7 +101,6 @@ static int show_image(GP_Framebuffer *fb, const char *img_path, int clear)
int main(int argc, char *argv[]) { - GP_Framebuffer *fb; GP_InputDriverLinux *drv = NULL; char *input_dev = NULL; int sleep_sec = 0; @@ -121,6 +134,8 @@ int main(int argc, char *argv[]) } }
+ signal(SIGINT, sighandler); + fb = GP_FramebufferInit("/dev/fb0");
if (fb == NULL) {
-----------------------------------------------------------------------
Summary of changes: demos/fbshow/fbshow.c | 17 ++++++++++++++++- libs/core/GP_Blit.c | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.