backends/native: Use framebuffer size on swap_buffers implementation

Instead of ClutterStageView layout, which may be affected by transformations.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
This commit is contained in:
Carlos Garnacho 2016-08-01 03:26:00 +02:00
parent a72bd1bd29
commit 6ce918661c

View File

@ -589,8 +589,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
CoglOnscreenEGL *egl_onscreen = onscreen->winsys; CoglOnscreenEGL *egl_onscreen = onscreen->winsys;
MetaOnscreenNative *onscreen_native = egl_onscreen->platform; MetaOnscreenNative *onscreen_native = egl_onscreen->platform;
CoglFrameInfo *frame_info; CoglFrameInfo *frame_info;
MetaRendererView *view;
cairo_rectangle_int_t view_layout;
uint32_t handle, stride; uint32_t handle, stride;
frame_info = g_queue_peek_tail (&onscreen->pending_frame_infos); frame_info = g_queue_peek_tail (&onscreen->pending_frame_infos);
@ -600,9 +598,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
while (onscreen_native->next_fb_id != 0) while (onscreen_native->next_fb_id != 0)
meta_monitor_manager_kms_wait_for_flip (monitor_manager_kms); meta_monitor_manager_kms_wait_for_flip (monitor_manager_kms);
view = onscreen_native->view;
clutter_stage_view_get_layout (CLUTTER_STAGE_VIEW (view), &view_layout);
parent_vtable->onscreen_swap_buffers_with_damage (onscreen, parent_vtable->onscreen_swap_buffers_with_damage (onscreen,
rectangles, rectangles,
n_rectangles); n_rectangles);
@ -615,8 +610,8 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
handle = gbm_bo_get_handle (onscreen_native->next_bo).u32; handle = gbm_bo_get_handle (onscreen_native->next_bo).u32;
if (drmModeAddFB (renderer_native->kms_fd, if (drmModeAddFB (renderer_native->kms_fd,
view_layout.width, cogl_framebuffer_get_width (COGL_FRAMEBUFFER (onscreen)),
view_layout.height, cogl_framebuffer_get_height (COGL_FRAMEBUFFER (onscreen)),
24, /* depth */ 24, /* depth */
32, /* bpp */ 32, /* bpp */
stride, stride,