[mutter/wip/garnacho/wayland-emulated-output-transform: 5/13] clutter: Hook up ClutterStageView render-to-texture
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/garnacho/wayland-emulated-output-transform: 5/13] clutter: Hook up ClutterStageView render-to-texture
- Date: Mon, 1 Aug 2016 11:35:49 +0000 (UTC)
commit 465a362e8dcdae3bdeda35b6190c913e0f53e56f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 1 02:55:13 2016 +0200
clutter: Hook up ClutterStageView render-to-texture
Draw on the back buffer, and "blit" the result on the framebuffer. This of
course only applies if there is a texture to render to, otherwise the onscreen
framebuffer is rendered to directly.
clutter/clutter/clutter-stage.c | 10 ++++++----
clutter/clutter/cogl/clutter-stage-cogl.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index edbc9b4..bfc3d2d 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -625,7 +625,7 @@ clutter_stage_do_paint_view (ClutterStage *stage,
const cairo_rectangle_int_t *clip)
{
ClutterStagePrivate *priv = stage->priv;
- CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
+ CoglFramebuffer *framebuffer = clutter_stage_view_get_back_buffer (view);
cairo_rectangle_int_t view_layout;
float clip_poly[8];
float viewport[4];
@@ -676,6 +676,8 @@ clutter_stage_do_paint_view (ClutterStage *stage,
_clutter_stage_paint_volume_stack_free_all (stage);
_clutter_stage_update_active_framebuffer (stage, framebuffer);
clutter_actor_paint (CLUTTER_ACTOR (stage));
+
+ clutter_stage_view_blit_back_buffer (view, clip);
}
/* This provides a common point of entry for painting the scenegraph
@@ -1357,7 +1359,7 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
{
ClutterActor *actor = CLUTTER_ACTOR (stage);
ClutterStagePrivate *priv = stage->priv;
- CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
+ CoglFramebuffer *fb = clutter_stage_view_get_back_buffer (view);
cairo_rectangle_int_t view_layout;
ClutterMainContext *context;
guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff };
@@ -2899,7 +2901,7 @@ clutter_stage_read_pixels (ClutterStage *stage,
if (clip_rect.width == 0 || clip_rect.height == 0)
return NULL;
- framebuffer = clutter_stage_view_get_framebuffer (view);
+ framebuffer = clutter_stage_view_get_back_buffer (view);
cogl_push_framebuffer (framebuffer);
clutter_stage_do_paint_view (stage, view, &clip_rect);
@@ -4677,7 +4679,7 @@ capture_view (ClutterStage *stage,
int stride;
CoglBitmap *bitmap;
- framebuffer = clutter_stage_view_get_framebuffer (view);
+ framebuffer = clutter_stage_view_get_back_buffer (view);
if (paint)
{
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 58979f1..b52b197 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -446,7 +446,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (view);
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
- CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
+ CoglFramebuffer *fb = clutter_stage_view_get_back_buffer (view);
cairo_rectangle_int_t view_rect;
gboolean have_clip;
gboolean may_use_clipped_redraw;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]