Lines Matching defs:bo
51 int DrmDriver::ModesetCreateFb(struct BufferObject* bo)
62 create.width = bo->width;
63 create.height = bo->height;
68 bo->pitch = create.pitch;
69 bo->size = create.size;
70 bo->handle = create.handle;
72 handles[0] = bo->handle;
73 pitches[0] = bo->pitch;
75 int ret = drmModeAddFB2(fd_, bo->width, bo->height, DRM_FORMAT_ARGB8888, handles, pitches, offsets, &bo->fbId, 0);
77 BATTERY_HILOGE(FEATURE_CHARGING, "[fbtest]failed to add fb (%{public}d x %{public}d), %{public}s", bo->width,
78 bo->height, strerror(errno));
85 bo->vaddr = static_cast<uint8_t*>(mmap(0, create.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, map.offset));
86 if (bo->vaddr == MAP_FAILED) {
93 while (i < bo->size) {
94 if (memcpy_s(&bo->vaddr[i], bo->size, &color, sizeof(color)) != EOK) {
315 void DrmDriver::ModesetDestroyFb(struct BufferObject* bo)
317 if (fd_ > 0 && bo->fbId != 0) {
318 drmModeRmFB(fd_, bo->fbId);
320 if (bo->vaddr != MAP_FAILED) {
321 munmap(bo->vaddr, bo->size);
325 destroy.handle = bo->handle;