Giter Site home page Giter Site logo

Comments (1)

cmeissl avatar cmeissl commented on September 24, 2024

The MemoryRenderBuffer was designed to work like the wayland surface element.

The size of the MemoryRenderBuffer is not in physical space, it uses buffer space. The scale you provide defines
the buffer scale. So to get the logical size of the element you would divide the buffer size by the buffer scale.
For the transform from logical space to physical space during rendering the output scale is used.

A wayland surface with buffer and scale would result in a protocol error as the size is not a multiple of the scale.
That is also one of the reason why the relatively new fractional scale protocol is doing things a bit differently.
It will always provide a buffer scale of 1 and use viewporter to set a specific logical size of the surface. But note
that this will still result in some rounding and some size are just not possible to represent correctly.

We can definitely improve the docs on the element to clarify how the scale correlates to the size.
But imo it's not a bug, more a shortcoming of the element which we should address.

While a wayland surface has this limitation because of the protocol spec, there is no requirement to have the same
limitations for the other render elements. We just have to be careful when lifting this limitation to not cause alignment
issues (e.g. gaps or overlaps) between the elements because of the necessary rounding in the wayland surface element.

from smithay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.