[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 4ec7c98: [graph] Explain the blender cache.
From: |
Werner Lemberg |
Subject: |
[freetype2-demos] master 4ec7c98: [graph] Explain the blender cache. |
Date: |
Fri, 20 Jan 2023 10:50:10 -0500 (EST) |
branch: master
commit 4ec7c98fe55722c8294901f3ae16cd8cb2e9cedc
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[graph] Explain the blender cache.
---
graph/gblblit.c | 11 +++++++----
graph/gblender.c | 18 ++++++++++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/graph/gblblit.c b/graph/gblblit.c
index a33015b..5499bd8 100644
--- a/graph/gblblit.c
+++ b/graph/gblblit.c
@@ -9,13 +9,16 @@
/* */
/****************************************************************************/
+/* The cached color gradients from the back- to foreground color are used
+ * to quickly look up the blended color for a given pixel coverage (alpha).
+ * They are calculated with gamma correction and stored with 8-bit depth
+ * per channel, in the range [0-255]. Other supported color representations
+ * require scaling to utilize the cache.
+ */
#include "grobjs.h"
#include "gblblit.h"
-/* blitting gray glyphs
- */
-
/* generic macros
*/
#define GRGB_PACK(r,g,b) ( ((GBlenderPixel)(r) << 16) | \
@@ -206,7 +209,7 @@
#include "gblany.h"
-/* Gray8 blitting routines
+/* Gray8 blitting routines, only 8-bit gray is supported
*/
#define GDST_TYPE gray8
#define GDST_INCR 1
diff --git a/graph/gblender.c b/graph/gblender.c
index 309240f..794cf44 100644
--- a/graph/gblender.c
+++ b/graph/gblender.c
@@ -1,3 +1,21 @@
+/****************************************************************************/
+/* */
+/* The FreeType project -- a free and portable quality TrueType renderer. */
+/* */
+/* Copyright (C) 1996-2023 by */
+/* D. Turner, R.Wilhelm, and W. Lemberg */
+/* */
+/* gblender.c: Alpha blending with gamma correction and caching. */
+/* */
+/****************************************************************************/
+
+/* The cached color gradients from the back- to foreground color are used
+ * to quickly look up the blended color for a given pixel coverage (alpha).
+ * They are calculated with gamma correction and stored with 8-bit depth
+ * per channel, in the range [0-255]. Other supported color representations
+ * require scaling to utilize the cache.
+ */
+
#include "gblender.h"
#include <stdlib.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 4ec7c98: [graph] Explain the blender cache.,
Werner Lemberg <=