GithubHelp home page GithubHelp logo

Comments (5)

waywardmonkeys avatar waywardmonkeys commented on July 17, 2024

This might need feedback from @raphlinus or @armansito

from vello.

waywardmonkeys avatar waywardmonkeys commented on July 17, 2024

Some further thoughts:

Doing a Scene::append_encoding() or allowing Scene::from_encoding() and then using Scene::append() would both require that the BumpEstimator on the Scene be updated to include what was in the Encoding.

Doing a Scene::append_encoding() would require that either the Encoding have its own BumpEstimator or that it be repeatedly calculated on every Scene::append_encoding() call.

Doing a Scene::from_encoding() would allow for it to cache that encoding's estimator.

Doing the middle option of a Scene::get_encoding_mut() would complicate bump estimator code given the current design.

from vello.

waywardmonkeys avatar waywardmonkeys commented on July 17, 2024

This is all related to https://xi.zulipchat.com/#narrow/stream/147932-chatter/topic/SVG.20icon.20libraries

from vello.

armansito avatar armansito commented on July 17, 2024

I think all of the approaches you described are reasonable. My main concern wrt adding a Scene::get_encoding_mut is that it may become a maintenance issue if we decide to add additional state to Scene that makes it more than a simple wrapper around Encoding.

The BumpEstimator is one such example as you pointed out. I'm not too worried about that particular case though, as I'm planning to move the estimation from scene construction time to resolve time (which happens later in the pipeline, right before instantiating the resources for a render).

from vello.

waywardmonkeys avatar waywardmonkeys commented on July 17, 2024

I have submitted a PR that allows for Scene::from(encoding) or encoding.into() returning a Scene. This would then work with passing the scene wrapping the encoding to Scene::append() without adding extra methods to Scene for append_encoding or the like and it is more typical Rust to do this than Scene::from_encoding().

from vello.

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.