summaryrefslogtreecommitdiff
path: root/src/haikuterm.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-26 01:19:56 +0000
committerPo Lu <luangruo@yahoo.com>2022-04-26 01:20:30 +0000
commit4a837b0c721c9680d8fc88d49d6c1805e279f284 (patch)
tree864108db0230b6adfc8864154986eca93627e63d /src/haikuterm.h
parentd6c7054ff5e1e87904353ddd73aecfead4321a7a (diff)
downloademacs-4a837b0c721c9680d8fc88d49d6c1805e279f284.tar.gz
emacs-4a837b0c721c9680d8fc88d49d6c1805e279f284.tar.bz2
emacs-4a837b0c721c9680d8fc88d49d6c1805e279f284.zip
Cache relief colors on Haiku since their computation is expensive
* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame): Clear `relief_background'. * src/haikuterm.c (haiku_calculate_relief_colors): Cache relief colors for each frame. * src/haikuterm.h (struct haiku_output): New fields for caching the last relief color.
Diffstat (limited to 'src/haikuterm.h')
-rw-r--r--src/haikuterm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/haikuterm.h b/src/haikuterm.h
index d20d491838f..30b474b1e1d 100644
--- a/src/haikuterm.h
+++ b/src/haikuterm.h
@@ -181,6 +181,17 @@ struct haiku_output
/* The type of any event that's being waited for. */
int wait_for_event_type;
+
+ /* The "dark" color of the current relief. */
+ uint32_t black_relief_pixel;
+
+ /* The "light" color of the current relief. */
+ uint32_t white_relief_pixel;
+
+ /* The background for which the relief colors above were computed.
+ They are changed only when a different background is involved.
+ -1 means no color has been computed. */
+ long relief_background;
};
struct x_output