[gtk+/wip/baedert/gl: 10/11] gl driver: Remove more unused API
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 10/11] gl driver: Remove more unused API
- Date: Fri, 29 Dec 2017 05:00:09 +0000 (UTC)
commit 65878648240f9410235a0bdacbefe0fdf6ea9bdd
Author: Timm Bäder <mail baedert org>
Date: Fri Dec 29 05:42:23 2017 +0100
gl driver: Remove more unused API
gsk/gl/gskgldriver.c | 33 ++-------------------------------
gsk/gl/gskgldriverprivate.h | 2 --
2 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index d29cea6..5f9735c 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -43,7 +43,6 @@ struct _GskGLDriver
GHashTable *textures;
const Texture *bound_source_texture;
- const Texture *bound_mask_texture;
const Fbo *bound_fbo;
int max_texture_size;
@@ -182,7 +181,6 @@ gsk_gl_driver_end_frame (GskGLDriver *self)
g_return_if_fail (self->in_frame);
self->bound_source_texture = NULL;
- self->bound_mask_texture = NULL;
self->bound_fbo = NULL;
self->default_fbo.fbo_id = 0;
@@ -499,33 +497,6 @@ gsk_gl_driver_bind_source_texture (GskGLDriver *driver,
}
}
-void
-gsk_gl_driver_bind_mask_texture (GskGLDriver *driver,
- int texture_id)
-{
- Texture *t;
-
- g_return_if_fail (GSK_IS_GL_DRIVER (driver));
- g_return_if_fail (driver->in_frame);
-
- t = gsk_gl_driver_get_texture (driver, texture_id);
- if (t == NULL)
- {
- g_critical ("No texture %d found.", texture_id);
- return;
- }
-
- if (driver->bound_mask_texture != t)
- {
- glActiveTexture (GL_TEXTURE0 + 1);
- glBindTexture (GL_TEXTURE_2D, t->texture_id);
-
- glActiveTexture (GL_TEXTURE0);
-
- driver->bound_mask_texture = t;
- }
-}
-
gboolean
gsk_gl_driver_bind_render_target (GskGLDriver *driver,
int texture_id)
@@ -599,7 +570,7 @@ gsk_gl_driver_init_texture_empty (GskGLDriver *driver,
return;
}
- if (!(driver->bound_source_texture == t || driver->bound_mask_texture == t))
+ if (driver->bound_source_texture != t)
{
g_critical ("You must bind the texture before initializing it.");
return;
@@ -633,7 +604,7 @@ gsk_gl_driver_init_texture_with_surface (GskGLDriver *self,
return;
}
- if (!(self->bound_source_texture == t || self->bound_mask_texture == t))
+ if (self->bound_source_texture != t)
{
g_critical ("You must bind the texture before initializing it.");
return;
diff --git a/gsk/gl/gskgldriverprivate.h b/gsk/gl/gskgldriverprivate.h
index 35cf1ce..17e7c5c 100644
--- a/gsk/gl/gskgldriverprivate.h
+++ b/gsk/gl/gskgldriverprivate.h
@@ -40,8 +40,6 @@ int gsk_gl_driver_create_render_target (GskGLDriver *driver
void gsk_gl_driver_bind_source_texture (GskGLDriver *driver,
int texture_id);
-void gsk_gl_driver_bind_mask_texture (GskGLDriver *driver,
- int texture_id);
gboolean gsk_gl_driver_bind_render_target (GskGLDriver *driver,
int texture_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]