[vte/wip/mosaic: 265/265] emulation: Add new SGR and implementation for separated mosaics
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/mosaic: 265/265] emulation: Add new SGR and implementation for separated mosaics
- Date: Sat, 14 Nov 2020 21:47:00 +0000 (UTC)
commit 4719a9a7752d621e5a5c23e208c1e970fd416ebf
Author: Christian Persch <chpe src gnome org>
Date: Sat Nov 14 22:46:43 2020 +0100
emulation: Add new SGR and implementation for separated mosaics
src/attr.hh | 1 +
src/minifont.cc | 7 +------
2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/attr.hh b/src/attr.hh
index 646d86d9..178aa7ef 100644
--- a/src/attr.hh
+++ b/src/attr.hh
@@ -18,6 +18,7 @@
#pragma once
#include <cstdint>
+#include <glib.h>
#define VTE_ATTR_VALUE_MASK(bits) ((1U << (bits)) - 1U)
#define VTE_ATTR_MASK(shift,bits) (VTE_ATTR_VALUE_MASK(bits) << (shift))
diff --git a/src/minifont.cc b/src/minifont.cc
index 5d106200..62f1be33 100644
--- a/src/minifont.cc
+++ b/src/minifont.cc
@@ -22,10 +22,10 @@
#include <cairo.h>
+#include "attr.hh"
#include "drawing-cairo.hh"
#include "minifont.hh"
-#ifdef WITH_SEPARATED_MOSAICS
static bool
_vte_draw_is_separable_mosaic(vteunistr c)
{
@@ -116,7 +116,6 @@ create_mosaic_separation_pattern(int width,
return pattern;
}
-#endif /* WITH_SEPARATED_MOSAICS */
/* pixman data must have stride 0 mod 4 */
static unsigned char const hatching_pattern_lr_data[16] = {
@@ -277,11 +276,9 @@ Minifont::draw_graphic(DrawingContext const& context,
xright = x + width;
ybottom = y + height;
-#ifdef WITH_SEPARATED_MOSAICS
auto const separated = vte_attr_get_bool(attr, VTE_ATTR_SEPARATED_MOSAIC_SHIFT)
&&_vte_draw_is_separable_mosaic(c);
if (separated)
cairo_push_group(cr);
-#endif
switch (c) {
@@ -1206,14 +1203,12 @@ Minifont::draw_graphic(DrawingContext const& context,
g_assert_not_reached();
}
-#ifdef WITH_SEPARATED_MOSAICS
if (separated) {
cairo_pop_group_to_source(cr);
auto pattern = create_mosaic_separation_pattern(width, height, light_line_width);
cairo_mask(cr, pattern);
cairo_pattern_destroy(pattern);
}
-#endif
cairo_restore(cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]