Lines Matching +full:data +full:- +full:width
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43 bhyvegc_init(int width, int height, void *fbaddr) in bhyvegc_init() argument
51 gc_image->width = width; in bhyvegc_init()
52 gc_image->height = height; in bhyvegc_init()
54 gc_image->data = fbaddr; in bhyvegc_init()
55 gc->raw = 1; in bhyvegc_init()
57 gc_image->data = calloc(width * height, sizeof (uint32_t)); in bhyvegc_init()
58 gc->raw = 0; in bhyvegc_init()
61 gc->gc_image = gc_image; in bhyvegc_init()
69 gc->raw = 1; in bhyvegc_set_fbaddr()
70 if (gc->gc_image->data && gc->gc_image->data != fbaddr) in bhyvegc_set_fbaddr()
71 free(gc->gc_image->data); in bhyvegc_set_fbaddr()
72 gc->gc_image->data = fbaddr; in bhyvegc_set_fbaddr()
76 bhyvegc_resize(struct bhyvegc *gc, int width, int height) in bhyvegc_resize() argument
80 gc_image = gc->gc_image; in bhyvegc_resize()
82 gc_image->width = width; in bhyvegc_resize()
83 gc_image->height = height; in bhyvegc_resize()
84 if (!gc->raw) { in bhyvegc_resize()
85 gc_image->data = reallocarray(gc_image->data, width * height, in bhyvegc_resize()
87 if (gc_image->data != NULL) in bhyvegc_resize()
88 memset(gc_image->data, 0, width * height * in bhyvegc_resize()
99 return (gc->gc_image); in bhyvegc_get_image()