[mutter] clutter/stage-view: Use cogl_blit_framebuffer() for shadow FB
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage-view: Use cogl_blit_framebuffer() for shadow FB
- Date: Fri, 27 Sep 2019 20:54:25 +0000 (UTC)
commit 05e1a6c2ca3cd6222590033e5978a9d9f6d22526
Author: Olivier Fourdan <ofourdan redhat com>
Date: Thu Sep 26 10:20:36 2019 +0200
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
clutter/clutter/clutter-stage-view.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c
index a12261f44..7db079f78 100644
--- a/clutter/clutter/clutter-stage-view.c
+++ b/clutter/clutter/clutter-stage-view.c
@@ -143,6 +143,18 @@ clutter_stage_view_blit_offscreen (ClutterStageView *view,
clutter_stage_view_get_instance_private (view);
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);
cogl_framebuffer_push_matrix (priv->framebuffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]