Deleted Added
full compact
vt_vga.c (298646) vt_vga.c (298848)
1/*-
2 * Copyright (c) 2005 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Copyright (c) 2009 The FreeBSD Foundation
6 * All rights reserved.
7 *
8 * Portions of this software were developed by Ed Schouten

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Copyright (c) 2009 The FreeBSD Foundation
6 * All rights reserved.
7 *
8 * Portions of this software were developed by Ed Schouten

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/vt/hw/vga/vt_vga.c 298646 2016-04-26 15:03:15Z pfg $");
34__FBSDID("$FreeBSD: head/sys/dev/vt/hw/vga/vt_vga.c 298848 2016-04-30 14:41:18Z pfg $");
35
36#include <sys/param.h>
37#include <sys/kernel.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40#include <sys/module.h>
41#include <sys/rman.h>
42

--- 864 unchanged lines hidden (view full) ---

907 const uint8_t *pattern, const uint8_t *mask,
908 unsigned int width, unsigned int height,
909 unsigned int x, unsigned int y, term_color_t fg, term_color_t bg)
910{
911 unsigned int x1, y1, x2, y2, i, j, src_x, dst_x, x_count;
912 uint8_t pattern_2colors;
913
914 /* Align coordinates with the 8-pxels grid. */
35
36#include <sys/param.h>
37#include <sys/kernel.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40#include <sys/module.h>
41#include <sys/rman.h>
42

--- 864 unchanged lines hidden (view full) ---

907 const uint8_t *pattern, const uint8_t *mask,
908 unsigned int width, unsigned int height,
909 unsigned int x, unsigned int y, term_color_t fg, term_color_t bg)
910{
911 unsigned int x1, y1, x2, y2, i, j, src_x, dst_x, x_count;
912 uint8_t pattern_2colors;
913
914 /* Align coordinates with the 8-pxels grid. */
915 x1 = x / VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK;
915 x1 = rounddown(x, VT_VGA_PIXELS_BLOCK);
916 y1 = y;
917
918 x2 = roundup(x + width, VT_VGA_PIXELS_BLOCK);
919 y2 = y + height;
920 x2 = min(x2, vd->vd_width - 1);
921 y2 = min(y2, vd->vd_height - 1);
922
923 for (j = y1; j < y2; ++j) {

--- 392 unchanged lines hidden ---
916 y1 = y;
917
918 x2 = roundup(x + width, VT_VGA_PIXELS_BLOCK);
919 y2 = y + height;
920 x2 = min(x2, vd->vd_width - 1);
921 y2 = min(y2, vd->vd_height - 1);
922
923 for (j = y1; j < y2; ++j) {

--- 392 unchanged lines hidden ---