• Home
  • Raw
  • Download

Lines Matching refs:buf

83 static inline CNativeBuffer *from_abuffer(aBuffer *buf) {  in from_abuffer()  argument
84 return (CNativeBuffer*) buf; in from_abuffer()
88 CNativeBuffer *buf = queue->next; in get_front() local
89 if (buf == queue) in get_front()
91 buf->next->prev = queue; in get_front()
92 queue->next = buf->next; in get_front()
93 buf->next = buf->prev = 0; in get_front()
94 return buf; in get_front()
98 struct CNativeBuffer *buf = (struct CNativeBuffer *) _buf; in put_front() local
99 buf->prev = queue; in put_front()
100 buf->next = queue->next; in put_front()
101 queue->next->prev = buf; in put_front()
102 queue->next = buf; in put_front()
106 struct CNativeBuffer *buf = (struct CNativeBuffer *) _buf; in put_back() local
107 buf->next = queue; in put_back()
108 buf->prev = queue->prev; in put_back()
109 queue->prev->next = buf; in put_back()
110 queue->prev = buf; in put_back()
131 static int cnw_dequeue_buffer1(aWindow *base, aBuffer **buf, int *ffd) { in cnw_dequeue_buffer1() argument
142 *buf = &cnb->base; in cnw_dequeue_buffer1()
144 LOG("<< dequeue buffer %p %d\n", *buf, *ffd); in cnw_dequeue_buffer1()
154 static void set_layer(hwc_layer_1_t *dl, aBuffer *buf, int ffd) { in set_layer() argument
155 int right = buf->width; in set_layer()
156 int bottom = buf->height; in set_layer()
162 dl->handle = buf->handle; in set_layer()
180 static void hwc_post(CNativeWindow *win, aBuffer *buf, int ffd) { in hwc_post() argument
195 set_layer(&dl[0], buf, ffd); in hwc_post()
222 CNativeBuffer *cnb = from_abuffer(buf); in hwc_post()
252 static int cnw_cancel_buffer1(aWindow *base, aBuffer *buf, int ffd) { in cnw_cancel_buffer1() argument
254 CNativeBuffer *cnb = from_abuffer(buf); in cnw_cancel_buffer1()
255 LOG("<< cancel buffer %p %d\n", buf, ffd); in cnw_cancel_buffer1()
258 put_front(&win->free_buffer_queue, buf); in cnw_cancel_buffer1()
263 static int cnw_dequeue_buffer0(aWindow *base, aBuffer **buf) { in cnw_dequeue_buffer0() argument
266 r = cnw_dequeue_buffer1(base, buf, &ffd); in cnw_dequeue_buffer0()
272 static int cnw_queue_buffer0(aWindow *base, aBuffer *buf) { in cnw_queue_buffer0() argument
273 return cnw_queue_buffer1(base, buf, -1); in cnw_queue_buffer0()
276 static int cnw_cancel_buffer0(aWindow *base, aBuffer *buf) { in cnw_cancel_buffer0() argument
277 return cnw_cancel_buffer1(base, buf, -1); in cnw_cancel_buffer0()
430 aBuffer *buf; in cnw_alloc() local
436 buf = &cnb->base; in cnw_alloc()
439 buf->common.magic = ANDROID_NATIVE_BUFFER_MAGIC; in cnw_alloc()
440 buf->common.version = sizeof(aBuffer); in cnw_alloc()
441 buf->common.incRef = cnw_inc_ref; in cnw_alloc()
442 buf->common.decRef = cnw_dec_ref; in cnw_alloc()
444 buf->width = win->width; in cnw_alloc()
445 buf->height = win->height; in cnw_alloc()
446 buf->format = format; in cnw_alloc()
447 buf->usage = usage; in cnw_alloc()
450 format, usage, &buf->handle, &buf->stride); in cnw_alloc()
454 free(buf); in cnw_alloc()
457 INFO("alloc buffer %p %d x %d\n", buf, win->width, win->height); in cnw_alloc()
458 return buf; in cnw_alloc()
508 aBuffer *buf = cnw_alloc(win, win->format, usage); in cnw_init() local
509 if (!buf) in cnw_init()
511 put_back(&win->free_buffer_queue, buf); in cnw_init()