Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
gtk
Commits
843475bd
Commit
843475bd
authored
Feb 09, 2015
by
Emmanuele Bassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gl: Drop GdkGLContextClass.upload_texture()
It's unnecessary to allow per-backend overrides.
parent
3b4bf963
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
gdk/gdkgl.c
gdk/gdkgl.c
+3
-2
gdk/gdkglcontext.c
gdk/gdkglcontext.c
+1
-5
gdk/gdkglcontextprivate.h
gdk/gdkglcontextprivate.h
+12
-12
No files found.
gdk/gdkgl.c
View file @
843475bd
...
...
@@ -716,8 +716,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
e
.
height
*=
sy
;
image
=
cairo_surface_map_to_image
(
surface
,
&
e
);
/* We might have a different alignment, stride or format, so allow overriding here if needed */
GDK_GL_CONTEXT_GET_CLASS
(
paint_context
)
->
upload_texture
(
paint_context
,
image
,
e
.
width
,
e
.
height
,
target
);
gdk_gl_context_upload_texture
(
paint_context
,
image
,
e
.
width
,
e
.
height
,
target
);
cairo_surface_unmap_image
(
surface
,
image
);
...
...
@@ -746,6 +745,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
}
}
#undef FLIP_Y
glDisable
(
GL_SCISSOR_TEST
);
glDeleteTextures
(
1
,
&
texture_id
);
}
gdk/gdkglcontext.c
View file @
843475bd
...
...
@@ -240,8 +240,7 @@ gdk_gl_context_get_property (GObject *gobject,
}
}
/* Default implementation of upload_texture() for gdk_gl_texture_from_surface() */
static
void
void
gdk_gl_context_upload_texture
(
GdkGLContext
*
context
,
cairo_surface_t
*
image_surface
,
int
width
,
...
...
@@ -332,9 +331,6 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
gobject_class
->
dispose
=
gdk_gl_context_dispose
;
gobject_class
->
finalize
=
gdk_gl_context_finalize
;
/* Default Implementation of upload_texture() for gdk_gl_texture_from_surface() */
klass
->
upload_texture
=
gdk_gl_context_upload_texture
;
g_object_class_install_properties
(
gobject_class
,
LAST_PROP
,
obj_pspecs
);
}
...
...
gdk/gdkglcontextprivate.h
View file @
843475bd
...
...
@@ -49,11 +49,6 @@ struct _GdkGLContextClass
gboolean
(
*
texture_from_surface
)
(
GdkGLContext
*
context
,
cairo_surface_t
*
surface
,
cairo_region_t
*
region
);
void
(
*
upload_texture
)
(
GdkGLContext
*
context
,
cairo_surface_t
*
image_surface
,
int
width
,
int
height
,
guint
texture_target
);
};
typedef
struct
{
...
...
@@ -74,13 +69,18 @@ typedef struct {
GdkGLContextProgram
*
current_program
;
}
GdkGLContextPaintData
;
GdkGLContextPaintData
*
gdk_gl_context_get_paint_data
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_use_texture_rectangle
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_has_framebuffer_blit
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_has_frame_terminator
(
GdkGLContext
*
context
);
void
gdk_gl_context_end_frame
(
GdkGLContext
*
context
,
cairo_region_t
*
painted
,
cairo_region_t
*
damage
);
void
gdk_gl_context_upload_texture
(
GdkGLContext
*
context
,
cairo_surface_t
*
image_surface
,
int
width
,
int
height
,
guint
texture_target
);
GdkGLContextPaintData
*
gdk_gl_context_get_paint_data
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_use_texture_rectangle
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_has_framebuffer_blit
(
GdkGLContext
*
context
);
gboolean
gdk_gl_context_has_frame_terminator
(
GdkGLContext
*
context
);
void
gdk_gl_context_end_frame
(
GdkGLContext
*
context
,
cairo_region_t
*
painted
,
cairo_region_t
*
damage
);
G_END_DECLS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment