freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 57d79ab: * graph/gblamy.h (*): Blend a bit fast


From: Alexei Podtelezhnikov
Subject: [freetype2-demos] master 57d79ab: * graph/gblamy.h (*): Blend a bit faster.
Date: Thu, 14 Jan 2021 17:09:37 -0500 (EST)

branch: master
commit 57d79ab8d8008c61b1ada47a5104bc87573c1fa3
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * graph/gblamy.h (*): Blend a bit faster.
---
 ChangeLog      |  8 ++++++--
 graph/gblany.h | 48 ++++++++++++++++++++++++------------------------
 2 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b8d74f1..a145dd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-01-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
+       * graph/gblamy.h (*): Blend a bit faster.
+
+2021-01-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
        [graph] Check blending cache earlier.
 
        This slightly reworks commit bfbd78261beff2d6 by moving the cache
@@ -7,9 +11,9 @@
        to keep the direct span rendering light.
 
        * graph/gblany.h (*): Move the cache check from here...
-        * graph/gblblit.c (gblender_blit_init, grSetTargetPenBrush): ... to
+       * graph/gblblit.c (gblender_blit_init, grSetTargetPenBrush): ... to
        here.
-        * graph/gblender.h (GBLANDER_VARS, GBLENDER_CHANNEL_VARS): Restore old
+       * graph/gblender.h (GBLANDER_VARS, GBLENDER_CHANNEL_VARS): Restore old
        macros.
 
 2021-01-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
diff --git a/graph/gblany.h b/graph/gblany.h
index 9486b94..fb28181 100644
--- a/graph/gblany.h
+++ b/graph/gblany.h
@@ -102,13 +102,13 @@ GCONCAT( _gblender_blit_gray8_, GDST_TYPE )( GBlenderBlit 
 blit,
   GBLENDER_VARS(blender,pix);
 
   int                   h        = blit->height;
-  const unsigned char*  src_line = blit->src_line;
-  unsigned char*        dst_line = blit->dst_line;
+  const unsigned char*  src_line = blit->src_line + blit->src_x;
+  unsigned char*        dst_line = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + (blit->src_x);
-    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do
@@ -163,13 +163,13 @@ GCONCAT( _gblender_blit_hrgb_, GDST_TYPE )( GBlenderBlit  
blit,
   GBLENDER_CHANNEL_VARS(blender,r,g,b);
 
   int                   h        = blit->height;
-  const unsigned char*  src_line = blit->src_line;
-  unsigned char*        dst_line = blit->dst_line;
+  const unsigned char*  src_line = blit->src_line + blit->src_x*3;
+  unsigned char*        dst_line = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + blit->src_x*3;
-    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do
@@ -248,13 +248,13 @@ GCONCAT( _gblender_blit_hbgr_, GDST_TYPE )( GBlenderBlit  
blit,
   GBLENDER_CHANNEL_VARS(blender,r,g,b);
 
   int                   h        = blit->height;
-  const unsigned char*  src_line = blit->src_line;
-  unsigned char*        dst_line = blit->dst_line;
+  const unsigned char*  src_line = blit->src_line + blit->src_x*3;
+  unsigned char*        dst_line = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + blit->src_x*3;
-    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do
@@ -333,14 +333,14 @@ GCONCAT( _gblender_blit_vrgb_, GDST_TYPE )( GBlenderBlit  
blit,
   GBLENDER_CHANNEL_VARS(blender,r,g,b);
 
   int                   h         = blit->height;
-  const unsigned char*  src_line  = blit->src_line;
   int                   src_pitch = blit->src_pitch;
-  unsigned char*        dst_line  = blit->dst_line;
+  const unsigned char*  src_line  = blit->src_line + blit->src_x;
+  unsigned char*        dst_line  = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + blit->src_x;
-    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do
@@ -419,14 +419,14 @@ GCONCAT( _gblender_blit_vbgr_, GDST_TYPE )( GBlenderBlit  
blit,
   GBLENDER_CHANNEL_VARS(blender,r,g,b);
 
   int                   h         = blit->height;
-  const unsigned char*  src_line  = blit->src_line;
   int                   src_pitch = blit->src_pitch;
-  unsigned char*        dst_line  = blit->dst_line;
+  const unsigned char*  src_line  = blit->src_line + blit->src_x;
+  unsigned char*        dst_line  = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + blit->src_x;
-    unsigned char*        dst = dst_line + blit->dst_x*GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do
@@ -501,13 +501,13 @@ GCONCAT( _gblender_blit_bgra_, GDST_TYPE )( GBlenderBlit  
blit,
   (void)color; /* unused */
 
   int                   h        = blit->height;
-  const unsigned char*  src_line = blit->src_line;
-  unsigned char*        dst_line = blit->dst_line;
+  const unsigned char*  src_line = blit->src_line + blit->src_x*4;
+  unsigned char*        dst_line = blit->dst_line + blit->dst_x*GDST_INCR;
 
   do
   {
-    const unsigned char*  src = src_line + blit->src_x * 4;
-    unsigned char*        dst = dst_line + blit->dst_x * GDST_INCR;
+    const unsigned char*  src = src_line;
+    unsigned char*        dst = dst_line;
     int                   w   = blit->width;
 
     do



reply via email to

[Prev in Thread] Current Thread [Next in Thread]