Lines Matching refs:gc_image
43 struct bhyvegc_image *gc_image; member
51 struct bhyvegc_image *gc_image; in bhyvegc_init() local
55 gc_image = calloc(1, sizeof(struct bhyvegc_image)); in bhyvegc_init()
56 gc_image->width = width; in bhyvegc_init()
57 gc_image->height = height; in bhyvegc_init()
59 gc_image->data = fbaddr; in bhyvegc_init()
62 gc_image->data = calloc(width * height, sizeof (uint32_t)); in bhyvegc_init()
66 gc->gc_image = gc_image; in bhyvegc_init()
69 pthread_mutex_init(&gc_image->mtx, NULL); in bhyvegc_init()
79 pthread_mutex_lock(&gc->gc_image->mtx); in bhyvegc_set_fbaddr()
82 if (gc->gc_image->data && gc->gc_image->data != fbaddr) in bhyvegc_set_fbaddr()
83 free(gc->gc_image->data); in bhyvegc_set_fbaddr()
84 gc->gc_image->data = fbaddr; in bhyvegc_set_fbaddr()
86 pthread_mutex_unlock(&gc->gc_image->mtx); in bhyvegc_set_fbaddr()
93 struct bhyvegc_image *gc_image; in bhyvegc_resize() local
96 pthread_mutex_lock(&gc->gc_image->mtx); in bhyvegc_resize()
98 gc_image = gc->gc_image; in bhyvegc_resize()
100 gc_image->width = width; in bhyvegc_resize()
101 gc_image->height = height; in bhyvegc_resize()
103 gc_image->data = reallocarray(gc_image->data, width * height, in bhyvegc_resize()
105 if (gc_image->data != NULL) in bhyvegc_resize()
106 memset(gc_image->data, 0, width * height * in bhyvegc_resize()
110 pthread_mutex_unlock(&gc->gc_image->mtx); in bhyvegc_resize()
120 return (gc->gc_image); in bhyvegc_get_image()