clutter/stage-view: Use cogl_blit_framebuffer() for shadow FB
If there is no transformation, use `cogl_blit_framebuffer()` as a shortcut in `clutter_stage_view_blit_offscreen()`, that dramatically improves performance when using a shadow framebuffer. https://gitlab.gnome.org/GNOME/mutter/merge_requests/809
This commit is contained in:
parent
25c1a85384
commit
05e1a6c2ca
@ -143,6 +143,18 @@ clutter_stage_view_blit_offscreen (ClutterStageView *view,
|
|||||||
clutter_stage_view_get_instance_private (view);
|
clutter_stage_view_get_instance_private (view);
|
||||||
CoglMatrix matrix;
|
CoglMatrix matrix;
|
||||||
|
|
||||||
|
clutter_stage_view_get_offscreen_transformation_matrix (view, &matrix);
|
||||||
|
if (cogl_matrix_is_identity (&matrix))
|
||||||
|
{
|
||||||
|
if (cogl_blit_framebuffer (priv->offscreen,
|
||||||
|
priv->framebuffer,
|
||||||
|
rect->x, rect->y,
|
||||||
|
rect->x, rect->y,
|
||||||
|
rect->width, rect->height,
|
||||||
|
NULL))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
clutter_stage_view_ensure_offscreen_blit_pipeline (view);
|
clutter_stage_view_ensure_offscreen_blit_pipeline (view);
|
||||||
cogl_framebuffer_push_matrix (priv->framebuffer);
|
cogl_framebuffer_push_matrix (priv->framebuffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user