[gtk/wip/chergert/glproto: 82/82] ensure clear call is done inside of frame begin/end
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 82/82] ensure clear call is done inside of frame begin/end
- Date: Thu, 24 Dec 2020 00:35:08 +0000 (UTC)
commit f5ed00d68b9faecab3f19acd96eab68b763f4c08
Author: Christian Hergert <chergert redhat com>
Date: Wed Dec 23 16:34:52 2020 -0800
ensure clear call is done inside of frame begin/end
gsk/next/gskglrenderer.c | 6 ++----
gsk/next/gskglrenderjob.c | 19 +++++++------------
gsk/next/gskglrenderjobprivate.h | 3 +--
3 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/gsk/next/gskglrenderer.c b/gsk/next/gskglrenderer.c
index 6d72b3af99..42aa01a1ef 100644
--- a/gsk/next/gskglrenderer.c
+++ b/gsk/next/gskglrenderer.c
@@ -231,8 +231,7 @@ gsk_gl_renderer_render (GskRenderer *renderer,
render_region,
0,
FALSE);
- gsk_gl_render_job_prepare (job, root);
- gsk_gl_render_job_render (job);
+ gsk_gl_render_job_render (job, root);
gdk_draw_context_end_frame (GDK_DRAW_CONTEXT (context));
gsk_gl_render_job_free (job);
@@ -270,8 +269,7 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
gsk_gl_command_queue_autorelease_framebuffer (self->command_queue, fbo_id);
job = gsk_gl_render_job_new (self->driver, viewport, 1, NULL, fbo_id, TRUE);
- gsk_gl_render_job_prepare (job, root);
- gsk_gl_render_job_render (job);
+ gsk_gl_render_job_render (job, root);
gsk_gl_render_job_free (job);
return create_texture_from_texture (context, texture_id, width, height);
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 9694be4538..311ebfd0e2 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -517,8 +517,8 @@ gsk_gl_render_job_visit_node (GskGLRenderJob *job,
}
void
-gsk_gl_render_job_prepare (GskGLRenderJob *job,
- GskRenderNode *root)
+gsk_gl_render_job_render (GskGLRenderJob *job,
+ GskRenderNode *root)
{
GdkGLContext *context;
@@ -528,24 +528,19 @@ gsk_gl_render_job_prepare (GskGLRenderJob *job,
context = gsk_next_driver_get_context (job->driver);
- gdk_gl_context_push_debug_group (context, "Adding render ops");
+ gsk_next_driver_begin_frame (job->driver);
gsk_gl_command_queue_bind_framebuffer (job->command_queue, job->framebuffer);
gsk_gl_command_queue_change_viewport (job->command_queue, &job->viewport);
gsk_gl_command_queue_clear (job->command_queue, 0);
+ gdk_gl_context_push_debug_group (context, "Building command queue");
gsk_gl_render_job_visit_node (job, root);
-
gdk_gl_context_pop_debug_group (context);
-}
-void
-gsk_gl_render_job_render (GskGLRenderJob *job)
-{
- g_return_if_fail (job != NULL);
- g_return_if_fail (GSK_IS_NEXT_DRIVER (job->driver));
-
- gsk_next_driver_begin_frame (job->driver);
+ gdk_gl_context_push_debug_group (context, "Executing command queue");
gsk_gl_command_queue_execute (job->command_queue);
+ gdk_gl_context_pop_debug_group (context);
+
gsk_next_driver_end_frame (job->driver);
}
diff --git a/gsk/next/gskglrenderjobprivate.h b/gsk/next/gskglrenderjobprivate.h
index 2c89078332..1e18ce9f85 100644
--- a/gsk/next/gskglrenderjobprivate.h
+++ b/gsk/next/gskglrenderjobprivate.h
@@ -30,8 +30,7 @@ GskGLRenderJob *gsk_gl_render_job_new (GskNextDriver *driver,
guint framebuffer,
gboolean flip_y);
void gsk_gl_render_job_free (GskGLRenderJob *job);
-void gsk_gl_render_job_prepare (GskGLRenderJob *job,
+void gsk_gl_render_job_render (GskGLRenderJob *job,
GskRenderNode *root);
-void gsk_gl_render_job_render (GskGLRenderJob *job);
#endif /* __GSK_GL_RENDER_JOB_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]