Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Modify struct rasops_info again (ride 9.99.4 ...



details:   https://anonhg.NetBSD.org/src/rev/843ea5f77903
branches:  trunk
changeset: 458708:843ea5f77903
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Aug 07 12:09:30 2019 +0000

description:
Modify struct rasops_info again (ride 9.99.4 bump).
- remove ri_buf and friends.
- remove ri_stamp and frieds.
- introduce ri_ul, which will be used for scaling underline with font.

Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta,
which was only used rasops routines internally. Now, size and offsets of
all members of struct rasops_info become same with netbsd-9, -8, and -7,
again. So we can safelly pull up fixes to any release branches!

diffstat:

 sys/dev/rasops/rasops.h |  29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diffs (57 lines):

diff -r 2b35e8d7d19e -r 843ea5f77903 sys/dev/rasops/rasops.h
--- a/sys/dev/rasops/rasops.h   Wed Aug 07 11:57:40 2019 +0000
+++ b/sys/dev/rasops/rasops.h   Wed Aug 07 12:09:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rasops.h,v 1.44 2019/08/07 11:47:33 rin Exp $ */
+/*     $NetBSD: rasops.h,v 1.45 2019/08/07 12:09:30 rin Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
 #ifndef _RASOPS_H_
 #define _RASOPS_H_ 1
 
+#include <sys/param.h>
+
 #include <dev/wscons/wsconsio.h>
 #include <dev/wsfont/wsfont.h>
 
@@ -113,6 +115,22 @@
        int     ri_emustride;   /* bytes per row we actually care about */
        int     ri_rows;        /* number of rows (characters, not pels) */
        int     ri_cols;        /* number of columns (characters, not pels) */
+#if __NetBSD_Prereq__(9, 99, 1)
+       struct {
+               int     off;    /* offset of underline from bottom */
+               int     height; /* height of underline */
+       } ri_ul;
+#else
+       /*
+        * XXX
+        * hack to keep ABI compatibility for netbsd-9, -8, and -7.
+        */
+       // int  ri_delta;       /* obsoleted */
+       struct {
+               short   off;
+               short   height;
+       } __packed ri_ul;
+#endif
        int     ri_pelbytes;    /* bytes per pel (may be zero) */
        int     ri_fontscale;   /* fontheight * fontstride */
        int     ri_xscale;      /* fontwidth * pelbytes */
@@ -131,15 +149,6 @@
        /* Callbacks so we can share some code */
        void    (*ri_do_cursor)(struct rasops_info *);
 
-       /* buffer capable of single-row pixels */
-       void    *ri_buf;
-       size_t  ri_buflen;
-
-       /* 4x1 stamp for optimized character blitting */
-       void    *ri_stamp;
-       long    ri_stamp_attr;
-       size_t  ri_stamp_len;
-
 #if NRASOPS_ROTATION > 0
        /* Used to intercept putchar to permit display rotation */
        struct  wsdisplay_emulops ri_real_ops;



Home | Main Index | Thread Index | Old Index