if (!backend->driver_interface->fetch_buffer (backend->driver,
head->console_buffer_id,
- &width, &height, &row_stride))
+ &width, &height, &row_stride,
+ NULL))
return false;
if (!backend->driver_interface->map_buffer (backend->driver,
uint32_t buffer_id,
unsigned long *width,
unsigned long *height,
- unsigned long *row_stride);
+ unsigned long *row_stride,
+ unsigned int *color_depth);
bool (* map_buffer) (ply_renderer_driver_t *driver,
uint32_t buffer_id);
unsigned long width;
unsigned long height;
unsigned long row_stride;
+ unsigned int color_depth;
uint32_t added_fb : 1;
};
uint32_t id,
unsigned long width,
unsigned long height,
- unsigned long row_stride)
+ unsigned long row_stride,
+ unsigned int color_depth)
{
ply_renderer_buffer_t *buffer;
buffer->width = width;
buffer->height = height;
buffer->row_stride = row_stride;
+ buffer->color_depth = color_depth;
- ply_trace ("returning %lux%lu buffer with stride %lu",
- width, height, row_stride);
+ ply_trace ("returning %lux%lu buffer with stride %lu and color depth %u",
+ width, height, row_stride, color_depth);
return buffer;
}
}
buffer = ply_renderer_buffer_new (driver, buffer_object, buffer_id,
- fb->width, fb->height, fb->pitch);
+ fb->width, fb->height, fb->pitch, fb->depth);
drmModeFreeFB (fb);
return buffer;
uint32_t buffer_id,
unsigned long *width,
unsigned long *height,
- unsigned long *row_stride)
+ unsigned long *row_stride,
+ unsigned int *color_depth)
{
ply_renderer_buffer_t *buffer;
if (row_stride != NULL)
*row_stride = buffer->row_stride;
- ply_trace ("fetched %lux%lu buffer with stride %lu",
- buffer->width, buffer->height, buffer->row_stride);
+ if (color_depth != NULL)
+ *color_depth = buffer->color_depth;
+
+ ply_trace ("fetched %lux%lu buffer with stride %lu and color depth %u",
+ buffer->width, buffer->height, buffer->row_stride, buffer->color_depth);
return true;
}
buffer = ply_renderer_buffer_new (driver,
buffer_object, buffer_id,
- width, height, *row_stride);
+ width, height, *row_stride, 24);
buffer->added_fb = true;
ply_hashtable_insert (driver->buffers,
(void *) (uintptr_t) buffer_id,
unsigned long width;
unsigned long height;
unsigned long row_stride;
+ unsigned int color_depth;
uint32_t added_fb : 1;
};
uint32_t id,
unsigned long width,
unsigned long height,
- unsigned long row_stride)
+ unsigned long row_stride,
+ unsigned int color_depth)
{
ply_renderer_buffer_t *buffer;
buffer->width = width;
buffer->height = height;
buffer->row_stride = row_stride;
+ buffer->color_depth = color_depth;
- ply_trace ("returning %lux%lu buffer with stride %lu",
- width, height, row_stride);
+ ply_trace ("returning %lux%lu buffer with stride %lu and color depth %u",
+ width, height, row_stride, color_depth);
return buffer;
}
}
buffer = ply_renderer_buffer_new (driver, buffer_object, buffer_id,
- fb->width, fb->height, fb->pitch);
+ fb->width, fb->height, fb->pitch, fb->depth);
drmModeFreeFB (fb);
return buffer;
uint32_t buffer_id,
unsigned long *width,
unsigned long *height,
- unsigned long *row_stride)
+ unsigned long *row_stride,
+ unsigned int *color_depth)
{
ply_renderer_buffer_t *buffer;
if (row_stride != NULL)
*row_stride = buffer->row_stride;
- ply_trace ("fetched %lux%lu buffer with stride %lu",
- buffer->width, buffer->height, buffer->row_stride);
+ if (color_depth != NULL)
+ *color_depth = buffer->color_depth;
+
+ ply_trace ("fetched %lux%lu buffer with stride %lu and color depth %u",
+ buffer->width, buffer->height, buffer->row_stride, buffer->color_depth);
return true;
}
buffer = ply_renderer_buffer_new (driver,
buffer_object, buffer_id,
- width, height, *row_stride);
+ width, height, *row_stride, 24);
buffer->added_fb = true;
ply_hashtable_insert (driver->buffers,
(void *) (uintptr_t) buffer_id,
unsigned long width;
unsigned long height;
unsigned long row_stride;
+ unsigned int color_depth;
uint32_t added_fb : 1;
};
uint32_t id,
unsigned long width,
unsigned long height,
- unsigned long row_stride)
+ unsigned long row_stride,
+ unsigned int color_depth)
{
ply_renderer_buffer_t *buffer;
buffer->width = width;
buffer->height = height;
buffer->row_stride = row_stride;
+ buffer->color_depth = color_depth;
- ply_trace ("returning %lux%lu buffer with stride %lu",
- width, height, row_stride);
+ ply_trace ("returning %lux%lu buffer with stride %lu and color depth %u",
+ width, height, row_stride, color_depth);
return buffer;
}
}
buffer = ply_renderer_buffer_new (driver, buffer_object, buffer_id,
- fb->width, fb->height, fb->pitch);
+ fb->width, fb->height, fb->pitch, fb->depth);
drmModeFreeFB (fb);
return buffer;
uint32_t buffer_id,
unsigned long *width,
unsigned long *height,
- unsigned long *row_stride)
+ unsigned long *row_stride,
+ unsigned int *color_depth)
{
ply_renderer_buffer_t *buffer;
if (row_stride != NULL)
*row_stride = buffer->row_stride;
- ply_trace ("fetched %lux%lu buffer with stride %lu",
- buffer->width, buffer->height, buffer->row_stride);
+ if (color_depth != NULL)
+ *color_depth = buffer->color_depth;
+
+ ply_trace ("fetched %lux%lu buffer with stride %lu and color depth %d",
+ buffer->width, buffer->height, buffer->row_stride, buffer->color_depth);
return true;
}
buffer = ply_renderer_buffer_new (driver,
buffer_object, buffer_id,
- width, height, *row_stride);
+ width, height, *row_stride, 24);
buffer->added_fb = true;
ply_hashtable_insert (driver->buffers,
(void *) (uintptr_t) buffer_id,