From owner-svn-src-all@FreeBSD.ORG Fri Sep 19 11:02:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0928D6E9; Fri, 19 Sep 2014 11:02:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDE2A270; Fri, 19 Sep 2014 11:02:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8JB2jKD056364; Fri, 19 Sep 2014 11:02:45 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8JB2jmI056360; Fri, 19 Sep 2014 11:02:45 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409191102.s8JB2jmI056360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 19 Sep 2014 11:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271868 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2014 11:02:46 -0000 Author: dumbbell Date: Fri Sep 19 11:02:44 2014 New Revision: 271868 URL: http://svnweb.freebsd.org/changeset/base/271868 Log: vt(4): Remove vt_buf->vb_dirtymask This structure and the associated functions were unused since the implementation of vd_bitblt_text_t callbacks. MFC after: 3 days Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Sep 19 10:39:58 2014 (r271867) +++ head/sys/dev/vt/vt.h Fri Sep 19 11:02:44 2014 (r271868) @@ -172,11 +172,6 @@ struct vt_device { * been modified. */ -struct vt_bufmask { - uint64_t vbm_row, vbm_col; -#define VBM_DIRTY UINT64_MAX -}; - struct vt_buf { struct mtx vb_lock; /* Buffer lock. */ term_pos_t vb_scr_size; /* (b) Screen dimensions. */ @@ -195,7 +190,6 @@ struct vt_buf { term_pos_t vb_mark_end; /* (b) Copy region end. */ int vb_mark_last; /* Last mouse event. */ term_rect_t vb_dirtyrect; /* (b) Dirty rectangle. */ - struct vt_bufmask vb_dirtymask; /* (b) Dirty bitmasks. */ term_char_t *vb_buffer; /* (u) Data buffer. */ term_char_t **vb_rows; /* (u) Array of rows */ }; @@ -209,7 +203,7 @@ void vtbuf_putchar(struct vt_buf *, cons void vtbuf_cursor_position(struct vt_buf *, const term_pos_t *); void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area); -void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); +void vtbuf_undirty(struct vt_buf *, term_rect_t *); void vtbuf_sethistory_size(struct vt_buf *, int); int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Fri Sep 19 10:39:58 2014 (r271867) +++ head/sys/dev/vt/vt_buf.c Fri Sep 19 11:02:44 2014 (r271868) @@ -195,39 +195,6 @@ vtbuf_iscursor(const struct vt_buf *vb, return (0); } -static inline uint64_t -vtbuf_dirty_axis(unsigned int begin, unsigned int end) -{ - uint64_t left, right, mask; - - /* - * Mark all bits between begin % 64 and end % 64 dirty. - * This code is functionally equivalent to: - * - * for (i = begin; i < end; i++) - * mask |= (uint64_t)1 << (i % 64); - */ - - /* Obvious case. Mark everything dirty. */ - if (end - begin >= 64) - return (VBM_DIRTY); - - /* 1....0; used bits on the left. */ - left = VBM_DIRTY << begin % 64; - /* 0....1; used bits on the right. */ - right = VBM_DIRTY >> -end % 64; - - /* - * Only take the intersection. If the result of that is 0, it - * means that the selection crossed a 64 bit boundary along the - * way, which means we have to take the complement. - */ - mask = left & right; - if (mask == 0) - mask = left | right; - return (mask); -} - static inline void vtbuf_dirty_locked(struct vt_buf *vb, const term_rect_t *area) { @@ -240,10 +207,6 @@ vtbuf_dirty_locked(struct vt_buf *vb, co vb->vb_dirtyrect.tr_end.tp_row = area->tr_end.tp_row; if (vb->vb_dirtyrect.tr_end.tp_col < area->tr_end.tp_col) vb->vb_dirtyrect.tr_end.tp_col = area->tr_end.tp_col; - vb->vb_dirtymask.vbm_row |= - vtbuf_dirty_axis(area->tr_begin.tp_row, area->tr_end.tp_row); - vb->vb_dirtymask.vbm_col |= - vtbuf_dirty_axis(area->tr_begin.tp_col, area->tr_end.tp_col); } void @@ -272,16 +235,14 @@ vtbuf_make_undirty(struct vt_buf *vb) vb->vb_dirtyrect.tr_begin = vb->vb_scr_size; vb->vb_dirtyrect.tr_end.tp_row = vb->vb_dirtyrect.tr_end.tp_col = 0; - vb->vb_dirtymask.vbm_row = vb->vb_dirtymask.vbm_col = 0; } void -vtbuf_undirty(struct vt_buf *vb, term_rect_t *r, struct vt_bufmask *m) +vtbuf_undirty(struct vt_buf *vb, term_rect_t *r) { VTBUF_LOCK(vb); *r = vb->vb_dirtyrect; - *m = vb->vb_dirtymask; vtbuf_make_undirty(vb); VTBUF_UNLOCK(vb); } Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Sep 19 10:39:58 2014 (r271867) +++ head/sys/dev/vt/vt_core.c Fri Sep 19 11:02:44 2014 (r271868) @@ -992,7 +992,6 @@ vt_flush(struct vt_device *vd) { struct vt_window *vw; struct vt_font *vf; - struct vt_bufmask tmask; term_rect_t tarea; term_pos_t size; #ifndef SC_NO_CUTPASTE @@ -1048,14 +1047,13 @@ vt_flush(struct vt_device *vd) vt_mark_mouse_position_as_dirty(vd); #endif - vtbuf_undirty(&vw->vw_buf, &tarea, &tmask); + vtbuf_undirty(&vw->vw_buf, &tarea); vt_termsize(vd, vf, &size); /* Force a full redraw when the screen contents are invalid. */ if (vd->vd_flags & VDF_INVALID) { tarea.tr_begin.tp_row = tarea.tr_begin.tp_col = 0; tarea.tr_end = size; - tmask.vbm_row = tmask.vbm_col = VBM_DIRTY; vd->vd_flags &= ~VDF_INVALID; }