Lines Matching defs:bo
49 int DrmDriver::ModesetCreateFb(struct BufferObject *bo)
60 create.width = bo->width;
61 create.height = bo->height;
66 bo->pitch = create.pitch;
67 bo->size = create.size;
68 bo->handle = create.handle;
70 handles[0] = bo->handle;
71 pitches[0] = bo->pitch;
73 int ret = drmModeAddFB2(fd_, bo->width, bo->height, DRM_FORMAT_ARGB8888, handles, pitches, offsets, &bo->fbId, 0);
75 LOG(ERROR) << "[fbtest]failed to add fb (" << bo->width << "x" << bo->height << "): " << strerror(errno);
82 bo->vaddr = static_cast<uint8_t *>(mmap(0, create.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, map.offset));
83 if (bo->vaddr == MAP_FAILED) {
90 while (i < bo->size) {
91 if (memcpy_s(&bo->vaddr[i], bo->size, &color, sizeof(color)) != EOK) {
314 void DrmDriver::ModesetDestroyFb(struct BufferObject *bo)
316 if (fd_ > 0 && bo->fbId != 0) {
317 drmModeRmFB(fd_, bo->fbId);
319 if (bo->vaddr != MAP_FAILED) {
320 munmap(bo->vaddr, bo->size);
324 destroy.handle = bo->handle;