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, master has been updated via 3e29dc184eff61f987adb9bbab4c223a9b07ff5f (commit) via e3dfb3d477878b7ae70682ef12aefb91d9a17dba (commit) from 852d0d3925acf658dd96979bfbaef0dabb45e81b (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/3e29dc184eff61f987adb9bbab4c223a9b07f...
commit 3e29dc184eff61f987adb9bbab4c223a9b07ff5f Merge: e3dfb3d 852d0d3 Author: Cyril Hrubis metan@ucw.cz Date: Sun May 22 12:16:58 2011 +0200
Merge branch 'master' of git://repo.or.cz/gfxprim
http://repo.or.cz/w/gfxprim.git/commit/e3dfb3d477878b7ae70682ef12aefb91d9a17...
commit e3dfb3d477878b7ae70682ef12aefb91d9a17dba Author: Cyril Hrubis metan@ucw.cz Date: Sun May 22 12:16:31 2011 +0200
Make FnPerBpp() even more clear.
diff --git a/core/GP_Circle.c b/core/GP_Circle.c index 354405e..8be5f55 100644 --- a/core/GP_Circle.c +++ b/core/GP_Circle.c @@ -41,7 +41,8 @@ void GP_Circle(GP_Context *context, int xcenter, int ycenter, { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_Circle, context, xcenter, ycenter, r, pixel); + GP_FN_PER_BPP(GP_Circle, context->bpp, context, + xcenter, ycenter, r, pixel); }
void GP_TCircle(GP_Context *context, int xcenter, int ycenter, diff --git a/core/GP_Ellipse.c b/core/GP_Ellipse.c index d499501..c3fefbb 100644 --- a/core/GP_Ellipse.c +++ b/core/GP_Ellipse.c @@ -41,7 +41,8 @@ void GP_Ellipse(GP_Context *context, int xcenter, int ycenter, { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_Ellipse, context, xcenter, ycenter, a, b, pixel); + GP_FN_PER_BPP(GP_Ellipse, context->bpp, context, + xcenter, ycenter, a, b, pixel); }
void GP_TEllipse(GP_Context *context, int xcenter, int ycenter, diff --git a/core/GP_FillCircle.c b/core/GP_FillCircle.c index e2a0f1f..a7cacb1 100644 --- a/core/GP_FillCircle.c +++ b/core/GP_FillCircle.c @@ -41,7 +41,8 @@ void GP_FillCircle(GP_Context *context, int xcenter, int ycenter, { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_FillCircle, context, xcenter, ycenter, r, pixel); + GP_FN_PER_BPP(GP_FillCircle, context->bpp, context, + xcenter, ycenter, r, pixel); }
void GP_TFillCircle(GP_Context *context, int xcenter, int ycenter, diff --git a/core/GP_FillEllipse.c b/core/GP_FillEllipse.c index 79df163..5625012 100644 --- a/core/GP_FillEllipse.c +++ b/core/GP_FillEllipse.c @@ -41,7 +41,8 @@ void GP_FillEllipse(GP_Context *context, int xcenter, int ycenter, { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_FillEllipse, context, xcenter, ycenter, a, b, pixel); + GP_FN_PER_BPP(GP_FillEllipse, context->bpp, context, + xcenter, ycenter, a, b, pixel); }
void GP_TFillEllipse(GP_Context *context, int xcenter, int ycenter, diff --git a/core/GP_FnPerBpp.h b/core/GP_FnPerBpp.h index 0e3da13..2a745e7 100644 --- a/core/GP_FnPerBpp.h +++ b/core/GP_FnPerBpp.h @@ -31,49 +31,49 @@ * Extra arguments are arguments to be passed to the function. * Returns GP_ENOIMPL if the bit depth is unknown. */ -#define GP_FN_PER_BPP(FN_NAME, context, args ...) +#define GP_FN_PER_BPP(FN_NAME, bpp, ...) - switch (context->bpp) { + switch (bpp) { case 1: - FN_NAME##1bpp(context, ##args); + FN_NAME##1bpp(__VA_ARGS__); break; case 2: - FN_NAME##2bpp(context, ##args); + FN_NAME##2bpp(__VA_ARGS__); break; case 4: - FN_NAME##4bpp(context, ##args); + FN_NAME##4bpp(__VA_ARGS__); break; case 8: - FN_NAME##8bpp(context, ##args); + FN_NAME##8bpp(__VA_ARGS__); break; case 16: - FN_NAME##16bpp(context, ##args); + FN_NAME##16bpp(__VA_ARGS__); break; case 24: - FN_NAME##24bpp(context, ##args); + FN_NAME##24bpp(__VA_ARGS__); break; case 32: - FN_NAME##32bpp(context, ##args); + FN_NAME##32bpp(__VA_ARGS__); break; default: break; } -#define GP_FN_RET_PER_BPP(FN_NAME, context, args ...) +#define GP_FN_RET_PER_BPP(FN_NAME, bpp, ...) - switch (context->bpp) { + switch (bpp) { case 1: - return FN_NAME##1bpp(context, ##args); + return FN_NAME##1bpp(__VA_ARGS__); case 2: - return FN_NAME##2bpp(context, ##args); + return FN_NAME##2bpp(__VA_ARGS__); case 4: - return FN_NAME##4bpp(context, ##args); + return FN_NAME##4bpp(__VA_ARGS__); case 8: - return FN_NAME##8bpp(context, ##args); + return FN_NAME##8bpp(__VA_ARGS__); case 16: - return FN_NAME##16bpp(context, ##args); + return FN_NAME##16bpp(__VA_ARGS__); case 24: - return FN_NAME##24bpp(context, ##args); + return FN_NAME##24bpp(__VA_ARGS__); case 32: - return FN_NAME##32bpp(context, ##args); + return FN_NAME##32bpp(__VA_ARGS__); } diff --git a/core/GP_GetPixel.c b/core/GP_GetPixel.c index 1f08f0c..3bbd201 100644 --- a/core/GP_GetPixel.c +++ b/core/GP_GetPixel.c @@ -47,7 +47,7 @@ GP_Pixel GP_GetPixel(GP_Context *context, int x, int y) { GP_CHECK_CONTEXT(context);
- GP_FN_RET_PER_BPP(GP_GetPixel, context, x, y); + GP_FN_RET_PER_BPP(GP_GetPixel, context->bpp, context, x, y);
return 0; } diff --git a/core/GP_HLine.c b/core/GP_HLine.c index 9e14052..71c4671 100644 --- a/core/GP_HLine.c +++ b/core/GP_HLine.c @@ -40,7 +40,7 @@ void GP_HLineXXY(GP_Context *context, int x0, int x1, int y, GP_Pixel pixel) { GP_CHECK_CONTEXT(context); - GP_FN_PER_BPP(GP_HLine, context, x0, x1, y, pixel); + GP_FN_PER_BPP(GP_HLine, context->bpp, context, x0, x1, y, pixel); }
void GP_HLineXYW(GP_Context *context, int x, int y, unsigned int w, diff --git a/core/GP_Line.c b/core/GP_Line.c index d8f495f..23ea98d 100644 --- a/core/GP_Line.c +++ b/core/GP_Line.c @@ -41,7 +41,7 @@ void GP_Line(GP_Context *context, int x0, int y0, int x1, int y1, { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_Line, context, x0, y0, x1, y1, pixel); + GP_FN_PER_BPP(GP_Line, context->bpp, context, x0, y0, x1, y1, pixel); }
void GP_TLine(GP_Context *context, int x0, int y0, int x1, int y1, diff --git a/core/GP_PutPixel.c b/core/GP_PutPixel.c index 5e62a5b..70bd85d 100644 --- a/core/GP_PutPixel.c +++ b/core/GP_PutPixel.c @@ -52,7 +52,7 @@ void GP_PutPixel(GP_Context *context, int x, int y, GP_Pixel pixel) { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_PutPixel, context, x, y, pixel); + GP_FN_PER_BPP(GP_PutPixel, context->bpp, context, x, y, pixel); }
void GP_TPutPixel(GP_Context *context, int x, int y, GP_Pixel pixel) diff --git a/core/GP_Text.c b/core/GP_Text.c index f9bc779..4e331b0 100644 --- a/core/GP_Text.c +++ b/core/GP_Text.c @@ -86,7 +86,8 @@ GP_RetCode GP_Text(GP_Context *context, const GP_TextStyle *style, return GP_EINVAL; }
- GP_FN_PER_BPP(GP_Text, context, style, topleft_x, topleft_y, str, pixel); + GP_FN_PER_BPP(GP_Text, context->bpp, context, + style, topleft_x, topleft_y, str, pixel);
return GP_ESUCCESS; } diff --git a/core/GP_VLine.c b/core/GP_VLine.c index 91e59b3..3985329 100644 --- a/core/GP_VLine.c +++ b/core/GP_VLine.c @@ -40,7 +40,7 @@ void GP_VLineXYY(GP_Context *context, int x, int y0, int y1, GP_Pixel pixel) { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_VLine, context, x, y0, y1, pixel); + GP_FN_PER_BPP(GP_VLine, context->bpp, context, x, y0, y1, pixel); }
void GP_VLineXYH(GP_Context *context, int x, int y, unsigned int height, diff --git a/filters/GP_Rotate.c b/filters/GP_Rotate.c index 0d46a9c..6f595fc 100644 --- a/filters/GP_Rotate.c +++ b/filters/GP_Rotate.c @@ -77,7 +77,7 @@ GP_RetCode GP_MirrorV(GP_Context *context) if (context == NULL) return GP_ENULLPTR;
- GP_FN_PER_BPP(GP_MirrorV, context); + GP_FN_PER_BPP(GP_MirrorV, context->bpp, context);
return GP_ESUCCESS; } @@ -95,7 +95,7 @@ GP_RetCode GP_RotateCW(GP_Context *context) if (context == NULL) return GP_ENULLPTR;
- GP_FN_RET_PER_BPP(GP_RotateCW, context); + GP_FN_RET_PER_BPP(GP_RotateCW, context->bpp, context);
return GP_ENOIMPL; } @@ -113,7 +113,7 @@ GP_RetCode GP_RotateCCW(GP_Context *context) if (context == NULL) return GP_ENULLPTR;
- GP_FN_RET_PER_BPP(GP_RotateCCW, context); + GP_FN_RET_PER_BPP(GP_RotateCCW, context->bpp, context);
return GP_ENOIMPL; }
-----------------------------------------------------------------------
Summary of changes: core/GP_Circle.c | 3 ++- core/GP_Ellipse.c | 3 ++- core/GP_FillCircle.c | 3 ++- core/GP_FillEllipse.c | 3 ++- core/GP_FnPerBpp.h | 36 ++++++++++++++++++------------------ core/GP_GetPixel.c | 2 +- core/GP_HLine.c | 2 +- core/GP_Line.c | 2 +- core/GP_PutPixel.c | 2 +- core/GP_Text.c | 3 ++- core/GP_VLine.c | 2 +- filters/GP_Rotate.c | 6 +++--- 12 files changed, 36 insertions(+), 31 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.