[gtk/wip/chergert/glproto: 80/493] some cleanup
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 80/493] some cleanup
- Date: Fri, 19 Feb 2021 02:25:05 +0000 (UTC)
commit 1a5f7b5c738127463e1b3aeef1c7b6e1e120e17d
Author: Christian Hergert <chergert redhat com>
Date: Mon Dec 28 23:19:38 2020 -0800
some cleanup
we dont need to call some things, just leave them as they were
gsk/next/gskglcommandqueue.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 02b730d46e..b06c832889 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -941,9 +941,6 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self)
sizeof (GskGLDrawVertex),
(void *) G_STRUCT_OFFSET (GskGLDrawVertex, uv));
- /* Start with default framebuffer */
- glBindFramebuffer (GL_FRAMEBUFFER, 0);
-
/* Start without a scissor clip */
glDisable (GL_SCISSOR_TEST);
@@ -958,7 +955,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self)
switch (batch->any.kind)
{
case GSK_GL_COMMAND_KIND_CLEAR:
- if (framebuffer != batch->clear.framebuffer)
+ if G_UNLIKELY (framebuffer != batch->clear.framebuffer)
{
framebuffer = batch->clear.framebuffer;
glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
@@ -1045,13 +1042,8 @@ gsk_gl_command_queue_begin_frame (GskGLCommandQueue *self)
self->tail_batch_index = -1;
- if (self->max_texture_size == -1)
+ if G_UNLIKELY (self->max_texture_size == -1)
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &self->max_texture_size);
-
- glBindFramebuffer (GL_FRAMEBUFFER, 0);
-
- glBindVertexArray (0);
- glUseProgram (0);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]