|
|
@ -112,10 +112,10 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
glPixelStorei(GL_PACK_ALIGNMENT, 1); |
|
|
|
output->compositor->renderer->read_pixels(output, |
|
|
|
glReadPixels(0, 0, output->current->width, output->current->height, |
|
|
|
output->compositor->read_format, pixels, |
|
|
|
output->compositor->read_format, |
|
|
|
0, 0, output->current->width, |
|
|
|
GL_UNSIGNED_BYTE, pixels); |
|
|
|
output->current->height); |
|
|
|
|
|
|
|
|
|
|
|
stride = wl_shm_buffer_get_stride(l->buffer); |
|
|
|
stride = wl_shm_buffer_get_stride(l->buffer); |
|
|
|
|
|
|
|
|
|
|
@ -123,10 +123,10 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data) |
|
|
|
s = pixels + stride * (l->buffer->height - 1); |
|
|
|
s = pixels + stride * (l->buffer->height - 1); |
|
|
|
|
|
|
|
|
|
|
|
switch (output->compositor->read_format) { |
|
|
|
switch (output->compositor->read_format) { |
|
|
|
case GL_BGRA_EXT: |
|
|
|
case PIXMAN_a8r8g8b8: |
|
|
|
copy_bgra_yflip(d, s, output->current->height, stride); |
|
|
|
copy_bgra_yflip(d, s, output->current->height, stride); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGBA: |
|
|
|
case PIXMAN_a8b8g8r8: |
|
|
|
copy_rgba_yflip(d, s, output->current->height, stride); |
|
|
|
copy_rgba_yflip(d, s, output->current->height, stride); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
@ -299,10 +299,10 @@ weston_recorder_frame_notify(struct wl_listener *listener, void *data) |
|
|
|
for (i = 0; i < n; i++) { |
|
|
|
for (i = 0; i < n; i++) { |
|
|
|
width = r[i].x2 - r[i].x1; |
|
|
|
width = r[i].x2 - r[i].x1; |
|
|
|
height = r[i].y2 - r[i].y1; |
|
|
|
height = r[i].y2 - r[i].y1; |
|
|
|
glReadPixels(r[i].x1, output->current->height - r[i].y2, |
|
|
|
output->compositor->renderer->read_pixels(output, |
|
|
|
width, height, |
|
|
|
output->compositor->read_format, recorder->rect, |
|
|
|
output->compositor->read_format, |
|
|
|
r[i].x1, output->current->height - r[i].y2, |
|
|
|
GL_UNSIGNED_BYTE, recorder->rect); |
|
|
|
width, height); |
|
|
|
|
|
|
|
|
|
|
|
s = recorder->rect; |
|
|
|
s = recorder->rect; |
|
|
|
p = recorder->rect; |
|
|
|
p = recorder->rect; |
|
|
@ -367,12 +367,15 @@ weston_recorder_create(struct weston_output *output, const char *filename) |
|
|
|
header.magic = WCAP_HEADER_MAGIC; |
|
|
|
header.magic = WCAP_HEADER_MAGIC; |
|
|
|
|
|
|
|
|
|
|
|
switch (output->compositor->read_format) { |
|
|
|
switch (output->compositor->read_format) { |
|
|
|
case GL_BGRA_EXT: |
|
|
|
case PIXMAN_a8r8g8b8: |
|
|
|
header.format = WCAP_FORMAT_XRGB8888; |
|
|
|
header.format = WCAP_FORMAT_XRGB8888; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGBA: |
|
|
|
case PIXMAN_a8b8g8r8: |
|
|
|
header.format = WCAP_FORMAT_XBGR8888; |
|
|
|
header.format = WCAP_FORMAT_XBGR8888; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
weston_log("unknown recorder format\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
header.width = output->current->width; |
|
|
|
header.width = output->current->width; |
|
|
|