Announcement

Collapse
No announcement yet.

Wayland's Weston Now Handles Full-Screen X Windows

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

  • #46
    Originally posted by pq__ View Post
    Your comment makes no sense. All rendering on Wayland is always direct rendering. There is no indirect rendering, because Wayland does not have a rendering protocol.
    Wayland without overlays does compositing using GL, which causes rendering to be indirect.
    The addition of atomic page flip to the kernel should allow the configuration of overlays within a frame boundary. This allows KMS Wayland compositors, such as Weston, to use overlays seamlessly. In this talk we'll cover how Weston assigns different surfaces to overlays and other planes, to reduce the portion of the screen that is composited using GL.
    http://www.phoronix.com/scan.php?pag...tem&px=MTI5NTE

    Comment


    • #47
      Originally posted by JS987 View Post
      Wayland without overlays does compositing using GL, which causes rendering to be indirect.

      http://www.phoronix.com/scan.php?pag...tem&px=MTI5NTE
      two pass rendering != indirect rendering

      GL indirect rendering means that the application is unable to talk to graphic hardware - thus GL calls have to be submitted to the server which in turn submit them to the gpu (as it's the only one with hw access privilieges) - hence AIGLX

      compositing means that an application IS able to operate on the gpu (within the device context it has been assigned), hence direct rendering - but since only the compositor/wm/server knows about windows from ALL active applications, they render offscreen textures that the compositor then renders on screen
      hence a 2 pass rendering, or redirected (direct) rendering

      which may have some overhead over rendering directly to screen in a single pass, but if you think about it the latter would apply only to full screen applications and overlays

      Comment


      • #48
        Originally posted by renox View Post
        1) Not all applications do this kind of rendering.
        2) You can cache several different glyphs for one character..
        I think that the ideal solution would be to have a 'duplicated identical cache' between the client and the server: at first the client and the server agree on a cache size (empty at the beginning), then the client send glyphs which are stored both in the client and the server cache, client and server use *identical* algorithm to manage the cache, so when a client see that a glyph is in its cache it knows that the server also has it in its cache and then it can send only a draw this glyphs references.
        The hard part is handling resynchronisation in case the server needs to reduce the cache size..
        It's not enough to cache several iterations of some letter. They can also overlap (and the overlap can change just as the shape) and can change dynamically, meaning you would have to cache the overlap data, and with the possibility of per-letter changes, the amount of permutations becomes rather unwieldy.

        Comment


        • #49
          Originally posted by curaga View Post
          While true, you simply cannot do that with modern text rendering. Truetype font glyphs can change their shape depending on what glyph is next to them.

          So trying to cache individual glyphs in one texture will result in ugly and unexpected text rendering.
          For Arial one texture per font size is enough.
          http://imageshack.us/photo/my-images...rendering.png/
          click image to view in original size

          Comment


          • #50
            Originally posted by silix View Post
            two pass rendering != indirect rendering
            2 pass rendering is indirect rendering.

            Comment


            • #51
              Originally posted by JS987 View Post
              For Arial one texture per font size is enough.
              http://imageshack.us/photo/my-images...rendering.png/
              click image to view in original size
              I assume that is with one cache per letter, because it shows exactly the ugly text rendering I was talking about. For example look at the space between S and o in Solid - that wouldn't be there in proper rendering.

              Comment


              • #52
                Perhaps this XKCD illustrates the issue: http://xkcd.com/1015/

                Bad kerning is one of the things that happens if you cache invidual letters - you're essentially making the truetype font be a fixed-width bitmap font, degrading its quality a lot.

                Comment


                • #53
                  Originally posted by curaga View Post
                  I assume that is with one cache per letter, because it shows exactly the ugly text rendering I was talking about. For example look at the space between S and o in Solid - that wouldn't be there in proper rendering.
                  Spacing can be changed by tuning of algorithm.

                  Comment


                  • #54
                    That's the entire point, you can't get proper text rendering by caching the glyphs as images and tweaking an algorithm. You can fake it and maybe get readable text most of the time, but it's not a good solution by any means, and would only work for western languages.

                    Comment


                    • #55
                      Originally posted by JS987 View Post
                      Wayland without overlays does compositing using GL, which causes rendering to be indirect.

                      http://www.phoronix.com/scan.php?pag...tem&px=MTI5NTE
                      Your statement is multiply false, and the quote you had has nothing to with your statement.
                      - Wayland is a protocol, Wayland does not composite with any specific method.
                      - Weston can also composite without GL, using pixman, in pure software.
                      - There is no indirect rendering. You cannot send rendering commands to the server, because there simply is no protocol to do that.
                      - Overlays have no implications to indirect rendering, double-buffered rendering, or two-pass rendering.

                      I think you meant compositing instead of indirect rendering.

                      Originally posted by JS987 View Post
                      2 pass rendering is indirect rendering.
                      False.

                      Two-pass rendering means that you render your geometry twice, for example first RGB channels, and then alpha channel. Or like some 3D apps, first depth only, and second actual color rendering. This can apply equally well to both clients and servers.

                      Indirect rendering means that a client sends rendering commands to the server, just like silix explained. Saying only "indirect rendering" does not define whether the rendering is on-screen or off-screen, it can be either one. It can also be single-pass or multi-pass. And it can be single- or double-buffered.

                      One concept you have not yet abused is double-buffered rendering. In double- (or triple-) buffered, a previous frame is being used while a new frame is being produced. When the new frame is complete, it can be taken into use by switching the buffers (flipping), or by copying. The purpose of double-buffering is to avoid using an incomplete frame. This too can apply equally well to both clients and servers, and it actually must be used in both to guarantee perfect output at all times.

                      Compositing means forming a big picture from several images. You can do it multi-pass or not. You can do it indirect or direct rendered, if you are running under another graphics server, provided the graphics server supports them. Compositing could be single-buffered, so the user will see incomplete composites flashing around, or it can double-buffered so the user will always see a good picture.

                      All these four concepts are completely orthogonal, and furthermore none of these mandates desktop effects.

                      Comment


                      • #56
                        Originally posted by curaga View Post
                        That's the entire point, you can't get proper text rendering by caching the glyphs as images and tweaking an algorithm. You can fake it and maybe get readable text most of the time, but it's not a good solution by any means, and would only work for western languages.
                        Unequal space between glyphs is minor bug. It doesn't really matter. Chromium and Firefox also have this bug with Arial on my machine. There are more serious bugs on Linux. I had to uninstall almost all non-Microsoft fonts because they look like crap.

                        Comment


                        • #57
                          Originally posted by pq__ View Post
                          Your statement is multiply false, and the quote you had has nothing to with your statement.
                          - Wayland is a protocol, Wayland does not composite with any specific method.
                          - Weston can also composite without GL, using pixman, in pure software.
                          - There is no indirect rendering. You cannot send rendering commands to the server, because there simply is no protocol to do that.
                          - Overlays have no implications to indirect rendering, double-buffered rendering, or two-pass rendering.
                          I think you meant compositing instead of indirect rendering.
                          False.
                          Two-pass rendering means that you render your geometry twice, for example first RGB channels, and then alpha channel. Or like some 3D apps, first depth only, and second actual color rendering. This can apply equally well to both clients and servers.
                          Indirect rendering means that a client sends rendering commands to the server, just like silix explained. Saying only "indirect rendering" does not define whether the rendering is on-screen or off-screen, it can be either one. It can also be single-pass or multi-pass. And it can be single- or double-buffered.
                          When I say Wayland I mean Wayland protocol or Wayland compositor.
                          Rendering is process of generating image. Compositing is also rendering. Weston also does rendering using compositing.
                          2 pass rendering can mean many things. Indirect rendering can mean many things.
                          If image output from applications is composited by compositor, applications do indirect rendering.

                          Comment


                          • #58
                            Originally posted by JS987 View Post
                            Disabled compositing - direct rendering using overlay.
                            Wayland doesn't support overlays, but it seems it will be fixed.
                            http://www.phoronix.com/scan.php?pag...tem&px=MTI5NTE
                            It seems this is what Kristian demonstrates here: http://youtu.be/L8zwnqKysfI?t=19m45s

                            So it can basically switch dynamically between sending a buffer to the compositor, and displaying that buffer directory onto the screen (if it's completely visible/uncovered by other windows).

                            Comment


                            • #59
                              Originally posted by curaga View Post
                              It's not enough to cache several iterations of some letter. They can also overlap (and the overlap can change just as the shape) and can change dynamically, meaning you would have to cache the overlap data, and with the possibility of per-letter changes, the amount of permutations becomes rather unwieldy.
                              Are you talking about the ligature mechanism? Because that isn't as complicated as you are describing. A font designer will include the ligatures for all 'ligaturiseable' pairs (such as 'fi', 'ff', 'ffi', 'Th', etc -- there aren't that many, and some fonts do not include them all) as discrete entries in the font. If a typesetting system is clever enough, it will recognise such pairs and just substitute the original pair for the special glyph in its output. It is not more subtle than that.

                              Beyond that, any typesetting system will obviously need to take account of a font's kerning tables to get correct inter-letter spacing. Some mechanism would need to be implemented for that, but I'm assuming that it is since it's so fundamental.
                              Last edited by Wingfeather; 02-21-2013, 12:26 PM.

                              Comment

                              Working...
                              X