Announcement

Collapse
No announcement yet.

Mir Display Server Support Lands In SDL2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Awesomeness View Post
    The fact right now is that code is duplicated.
    Just compare https://hg.libsdl.org/SDL/file/52f86...L_waylanddyn.c against https://hg.libsdl.org/SDL/file/52f86...r/SDL_mirdyn.c
    Occasionally here is a line of code missing, there was a line of code added and in the end the Mir back-end has 20 lines of code less in this file than the Wayland back-end but the rest is pretty much a search "WAYLAND" and replace with "MIR". Even the comments are the same:

    Code:
    #if DEBUG_DYNAMIC_WAYLAND
        if (fn != NULL)
            SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn);
        else
            SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
    #endif
    
        if (fn == NULL)
            *pHasModule = 0;  /* kill this module. */
    
        return fn;
    }
    
    #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
    
    /* Define all the function pointers and wrappers... */
    #define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
    #define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
    #define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL;
    #include "SDL_waylandsym.h"
    #undef SDL_WAYLAND_MODULE
    #undef SDL_WAYLAND_SYM
    #undef SDL_WAYLAND_INTERFACE
    Code:
    #if DEBUG_DYNAMIC_MIR
        if (fn != NULL)
            SDL_Log("MIR: Found '%s' in %s (%p)\n", fnname, mirlibs[i].libname, fn);
        else
            SDL_Log("MIR: Symbol '%s' NOT FOUND!\n", fnname);
    #endif
    
        if (fn == NULL)
            *pHasModule = 0;  /* kill this module. */
    
        return fn;
    }
    
    #endif /* SDL_VIDEO_DRIVER_MIR_DYNAMIC */
    
    /* Define all the function pointers and wrappers... */
    #define SDL_MIR_MODULE(modname) int SDL_MIR_HAVE_##modname = 0;
    #define SDL_MIR_SYM(rc,fn,params) SDL_DYNMIRFN_##fn MIR_##fn = NULL;
    #include "SDL_mirsym.h"
    #undef SDL_MIR_MODULE
    #undef SDL_MIR_SYM
    Even the file names just had a search&replace done: https://hg.libsdl.org/SDL/file/52f86.../video/wayland https://hg.libsdl.org/SDL/file/52f86.../src/video/mir
    Which just goes to show how much unecessary FUD-slinging was involved in Mir/Wayland fiasco. Coding for both is pretty much the same with minor differences and all that matters is having your toolkit like SDL to support it which wouldn't take much additional effort.

    Comment


    • #17
      Originally posted by mmstick View Post
      Which just goes to show how much unecessary FUD-slinging was involved in Mir/Wayland fiasco. Coding for both is pretty much the same with minor differences and all that matters is having your toolkit like SDL to support it which wouldn't take much additional effort.
      So it basically comes down to mir being a thin wrapper around wayland and having the CLA license?!

      Comment


      • #18
        Originally posted by shmerl View Post
        Wayland support in SDL2 is important for Sailfish.
        Wayland support in SDL2 is there since some time ago already. But in this thread we are currently discussing Mir, so I don't see the relevance of your comment.
        Also, Wayland support is important for way more things than just Sailfish, most big desktops are planning to go Wayland.

        Comment


        • #19
          Originally posted by BSDude View Post
          So it basically comes down to mir being a thin wrapper around wayland and having the CLA license?!
          I'm puzzled, how do you come to such a conclusion?

          Comment


          • #20
            Originally posted by mmstick View Post
            I'm puzzled, how do you come to such a conclusion?
            He's just trolling. Hoping to start a flamewar.

            Everybody know Wayland is a protocol and Mir a display server.

            Comment


            • #21
              Originally posted by Awesomeness View Post
              The fact right now is that code is duplicated.
              Just compare https://hg.libsdl.org/SDL/file/52f86...L_waylanddyn.c against https://hg.libsdl.org/SDL/file/52f86...r/SDL_mirdyn.c
              Occasionally here is a line of code missing, there was a line of code added and in the end the Mir back-end has 20 lines of code less in this file than the Wayland back-end but the rest is pretty much a search "WAYLAND" and replace with "MIR". Even the comments are the same:
              You've picked the files that are almost identical but the rest have bigger differences. Also there are files in Wayland support (waylandtouch) which don't exist in Mir support and vice versa (mirframebuffer).

              Originally posted by Awesomeness View Post
              By that logic the Wayland file names are just search and replace from X11 backend or Haiku or other video backends.

              https://hg.libsdl.org/SDL/file/52f86.../src/video/x11

              https://hg.libsdl.org/SDL/file/52f86...rc/video/haiku
              Last edited by Bestia; 02-04-2014, 06:00 AM.

              Comment


              • #22
                Originally posted by mmstick View Post
                Which just goes to show how much unecessary FUD-slinging was involved in Mir/Wayland fiasco. Coding for both is pretty much the same with minor differences and all that matters is having your toolkit like SDL to support it which wouldn't take much additional effort.
                Or, it goes to show how unnecessary it was to create Mir in the first place... and how much unnecessary FUD-slinging was involved from Canonical when they announced Mir.

                Comment


                • #23
                  Originally posted by Delgarde View Post
                  Both of them are pretty much just a thin wrapper around the OpenGL layer, aren't they? So most of the code will be GL API calls, with just a little bit tying it to Mir or Wayland?
                  Replace "GL" with "EGL", and you might almost be right. EGL is used for the most part to setup a GL drawable and context. Other vital things like input and window state management however have nothing to do with EGL/GL, and are obviously different for Wayland/Mir. Although I think both use libxkbcommon for scancode->keysym translation.

                  Comment


                  • #24
                    Originally posted by Awesomeness View Post
                    Mir support is mostly copy and paste from the Wayland port.
                    Do you have any evidence at all to support this assertion?

                    Comment


                    • #25
                      Originally posted by Awesomeness View Post
                      The fact right now is that code is duplicated.
                      Even the file names just had a search&replace done: https://hg.libsdl.org/SDL/file/52f86.../video/wayland https://hg.libsdl.org/SDL/file/52f86.../src/video/mir
                      Jeesus, the trolling is strong with this thread. I mean, it's not like SDL has a naming convention for their files or something.

                      Comment


                      • #26
                        Originally posted by Awesomeness View Post
                        The fact right now is that code is duplicated.
                        So, you decided with intent that the Mir implementation copied the Wayland implementation, and not the other way around.

                        Perhaps what happened was both new implementations started with one of the other existing implementations? It is, after all, free software where we're encouraged to share and share alike. Condemning one project for being free and condoning the other reveals more about the poster than the projects.

                        Comment


                        • #27
                          Originally posted by phoronix View Post
                          Well known Linux game porter Ryan Gordon pushed to SDL mainline
                          Originally posted by phoronix View Post
                          This Mir video target for SDL seems to be principally designed by Brandon Schaefer at Canonical.
                          So Canonical wrote the patch and handled it over to Ryan Gordon to maintain as we all know Canonical wouldn't maintain it for themselves (and as such there would be a high chance that SDL rejects the patches) ? Well done Canonical, well done...

                          Comment


                          • #28
                            Originally posted by TAXI View Post
                            So Canonical wrote the patch and handled it over to Ryan Gordon to maintain as we all know Canonical wouldn't maintain it for themselves (and as such there would be a high chance that SDL rejects the patches) ? Well done Canonical, well done...
                            I suppose that you would like to that whoever wrote the Wayland backend would also maintain it as set of patches that are seperate from upstream SDL.

                            Comment


                            • #29
                              Originally posted by bregma View Post
                              So, you decided with intent that the Mir implementation copied the Wayland implementation, and not the other way around.
                              Well, Wayland support code went public before, so if any of those copies the other, it must be Mir copying Wayland. BUT:

                              Perhaps what happened was both new implementations started with one of the other existing implementations?
                              This and being there a common, standard way to handle this things are the most likely situations.

                              It is, after all, free software where we're encouraged to share and share alike.
                              Big truth.

                              Condemning one project for being free and condoning the other reveals more about the poster than the projects.
                              Nobody is condemning it for being free. Most of the people who criticizes Mir does so because they disagree with the CLA or because they fear it will fragment the desktop, not because it's free software.

                              Originally posted by TAXI View Post
                              So Canonical wrote the patch and handled it over to Ryan Gordon to maintain as we all know Canonical wouldn't maintain it for themselves (and as such there would be a high chance that SDL rejects the patches) ? Well done Canonical, well done...
                              If Ryan accepted the patches, what makes you think it would be rejected?

                              Comment


                              • #30
                                Wayland is ahead of Mir in mobile (Sailfish), and it's ahead of Mir in desktop (Gnome, Enlightenment, etc), and it's also ahead of it in toolkit support. Now the question is: does Mir provide any technical superiority over Wayland? If it doesn't then what's the point behind it?

                                I am not trolling. I really want to know if there is any technical advantages in Mir.

                                Comment

                                Working...
                                X