Commit d328e9e8 authored by Alexei Podtelezhnikov's avatar Alexei Podtelezhnikov

* graph/gblany.h, graph/gblblit.c: Multiply by 0x010101U.

parent 355c0da1
2021-02-25 Alexei Podtelezhnikov <apodtele@gmail.com>
* graph/gblany.h, graph/gblblit.c: Multiply by 0x010101U.
2021-02-24 Alexei Podtelezhnikov <apodtele@gmail.com>
PNG writing routines using GDI+.
......
......@@ -175,9 +175,7 @@ GCONCAT( _gblender_blit_hrgb_, GDST_TYPE )( GBlenderBlit blit,
{
/* nothing */
}
else if ( aa == (((GBLENDER_SHADE_COUNT-1) << 16) |
((GBLENDER_SHADE_COUNT-1) << 8) |
(GBLENDER_SHADE_COUNT-1) ) )
else if ( aa == (GBLENDER_SHADE_COUNT-1) * 0x010101U )
{
GDST_COPY(dst);
}
......@@ -239,9 +237,7 @@ GCONCAT( _gblender_blit_hbgr_, GDST_TYPE )( GBlenderBlit blit,
{
/* nothing */
}
else if ( aa == (((GBLENDER_SHADE_COUNT-1) << 16) |
((GBLENDER_SHADE_COUNT-1) << 8) |
(GBLENDER_SHADE_COUNT-1) ) )
else if ( aa == (GBLENDER_SHADE_COUNT-1) * 0x010101U )
{
GDST_COPY(dst);
}
......@@ -304,9 +300,7 @@ GCONCAT( _gblender_blit_vrgb_, GDST_TYPE )( GBlenderBlit blit,
{
/* nothing */
}
else if ( aa == (((GBLENDER_SHADE_COUNT-1) << 16) |
((GBLENDER_SHADE_COUNT-1) << 8) |
(GBLENDER_SHADE_COUNT-1) ) )
else if ( aa == (GBLENDER_SHADE_COUNT-1) * 0x010101U )
{
GDST_COPY(dst);
}
......@@ -369,9 +363,7 @@ GCONCAT( _gblender_blit_vbgr_, GDST_TYPE )( GBlenderBlit blit,
{
/* nothing */
}
else if ( aa == (((GBLENDER_SHADE_COUNT-1) << 16) |
((GBLENDER_SHADE_COUNT-1) << 8) |
(GBLENDER_SHADE_COUNT-1) ) )
else if ( aa == (GBLENDER_SHADE_COUNT-1) * 0x010101U )
{
GDST_COPY(dst);
}
......
......@@ -71,7 +71,7 @@
#define GRGB_TO_GRAY8(r,g,b) ( (unsigned char)( ( 3*(r) + 6*(g) + (b) ) / 10 ) )
#define GGRAY8_TO_RGB24(p) GRGB_PACK(p,p,p)
#define GGRAY8_TO_RGB24(p) ( (p) * 0x010101U )
#define GRGB24_TO_GRAY8(p) ( (unsigned char)( ( 3*( ((p) >> 16) & 0xFF ) + \
6*( ((p) >> 8) & 0xFF ) + \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment