[gtk+/wip/ebassi/gl-context-realize] GDK-Win32: Drop Win32-specific ->upload_texture()



commit facb2687e0f9dcd2b3adf9f22c13a3fea459ff29
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Feb 6 12:39:04 2015 +0800

    GDK-Win32: Drop Win32-specific ->upload_texture()
    
    The default ->upload_texture() works also for Windows since commit 27cf0fa,
    as some of the problems described in 742953 also applied for GL core
    contexts on Windows as well before 27cf0fa.  Clean up the GDK-Win32 code a
    little bit as a result.

 gdk/win32/gdkglcontext-win32.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)
---
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index b8f8d11..7ac610b 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -73,7 +73,6 @@ gdk_win32_gl_context_class_init (GdkWin32GLContextClass *klass)
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
   context_class->end_frame = _gdk_win32_gl_context_end_frame;
-  context_class->upload_texture = _gdk_win32_gl_context_upload_texture;
   context_class->realize = _gdk_win32_gl_context_realize;
 
   gobject_class->dispose = _gdk_win32_gl_context_dispose;
@@ -190,22 +189,6 @@ _gdk_win32_window_invalidate_for_new_frame (GdkWindow *window,
     }
 }
 
-void
-_gdk_win32_gl_context_upload_texture (GdkGLContext *context,
-                                      cairo_surface_t *image_surface,
-                                      int width,
-                                      int height,
-                                      guint texture_target)
-{
-  g_return_if_fail (GDK_WIN32_IS_GL_CONTEXT (context));
-
-  glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
-  glPixelStorei (GL_UNPACK_ROW_LENGTH, cairo_image_surface_get_stride (image_surface)/4);
-  glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_BYTE,
-                cairo_image_surface_get_data (image_surface));
-  glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
-}
-
 typedef struct
 {
   ATOM wc_atom;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]