Announcement

Collapse
No announcement yet.

Wayland Gets A Simple Drawing Library

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

  • #16
    Cairo

    Just use Cairo?

    Comment


    • #17
      Originally posted by plonoma View Post
      Don't know if this is bloat and the beginning of the dark path X has taken or is something that should be worked out.
      Bloat? It's an external libary.

      Originally posted by uid313
      Just use Cairo?
      A while back I was interested in porting dmenu[0] and st[1] to wayland.
      However, the available rendering stack (cairo + pango + glib +
      opengl/pixman) seemed a bit overkill to me when all I needed was two
      simple operations, "fill rectangle with color" and "draw monochrome text
      with color".

      Comment


      • #18
        Originally posted by Teho View Post
        Bloat? It's an external libary.
        However, the available rendering stack (cairo + pango + glib +
        opengl/pixman) seemed a bit overkill to me when all I needed was two
        simple operations
        Could be wrong, but I'm pretty sure he was talking about this(^^), not the library he decided to write because of this.

        Originally posted by uid313
        Just use Cairo?
        Cairo depends on glib and pixman...not sure what he has against these libraries, but...yeah.

        Comment


        • #19
          Seeing as I used DMenu to open this very browser window, I'm quite happy with this news.

          Comment


          • #20
            Originally posted by Nobu View Post
            Could be wrong, but I'm pretty sure he was talking about this(^^), not the library he decided to write because of this.
            Wayland doesn't mandate any of them. They make your life simple, since you are required to tell how to paint the buffer. If they get obsolete, you can just ditch them.

            Cairo depends on glib and pixman...not sure what he has against these libraries, but...yeah.
            Considering what he's porting is pretty much minimalistic software, Cairo is indeed overkill.

            Comment


            • #21
              "Wayland doesn't mandate any of them."

              Of course, just thought I'd clear up any possible misunderstanding.

              As far as minimalistic, I wouldn't know. If you don't use any other programs that use them, then I guess they are unnecessary and overkill (he's just doing rectangles and monochrome graphics, after all). But if they were already being used, and there was a way to create a monochrome buffer and use it in the wayland compositor without converting it to some other format (or, even if you used the standard buffer format), then I think they would be fine.

              However, I'm guessing he would like to assume his users are using the minimum necessary, in which case they may not be using apps which use cairo, etc..

              Comment


              • #22
                Originally posted by Nobu View Post
                Cairo depends on glib and pixman...not sure what he has against these libraries, but...yeah.
                Nope, only pixman (that is, if you didn't disable software rendering fallback)

                Comment


                • #23
                  Oh, then I guess this page is a bit outdated, or maybe it's specific to lfs. Couldn't find anything on cairographics.org about build or run-time dependencies, granted I didn't look too hard.

                  Comment


                  • #24
                    Originally posted by Nobu View Post
                    Oh, then I guess this page is a bit outdated, or maybe it's specific to lfs. Couldn't find anything on cairographics.org about build or run-time dependencies, granted I didn't look too hard.
                    This is most likely there because pkg-config depends on glib. For all Cairo dependencies, they're listed in the README.

                    Comment


                    • #25
                      Originally posted by Ancurio View Post
                      This is most likely there because pkg-config depends on glib. For all Cairo dependencies, they're listed in the README.
                      Cairo does not depend upon glib. Pango does.

                      Anyway, I think some of you are missing the point. Most of rendering code (for pixman) is just plugging FreeType's output into pixman's glyph cache system. In fact, adding a rendering backend that used Cairo instead would be roughly the same amount of work.

                      Additionally, Cairo does not deal at all with Wayland, requiring you to support EGL and shared memory buffers manually (doing both buffer creation and fallback yourselves). I believe that Weston's toytoolkit is the only other thing that does this for you at the moment, and it is, as the name implies, just an example of how a toolkit could look. Even Gtk+ currently only supports Cairo image surfaces with a SHM buffer.

                      Hopefully this clears up the motivations and intentions for this project.

                      Comment


                      • #26
                        Originally posted by tridactyla View Post
                        Cairo does not depend upon glib. Pango does.
                        This isn't relevant because cairo itself doesn't depend on pango. The person I originally replied to provided a link to a LFS doc that stated glib as a dependency of cairo.

                        Comment

                        Working...
                        X