Giter Site home page Giter Site logo

Performance Comparison about blend2d HOT 20 CLOSED

blend2d avatar blend2d commented on May 25, 2024 2
Performance Comparison

from blend2d.

Comments (20)

rubenvb avatar rubenvb commented on May 25, 2024 6

It would also be extremely interesting to see a comparison with Skia. The currently compared libraries are "old", although Qt has perhaps evolved the most of them architecturally.

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024 3

I think this issue can finally be closed, because:

  • Blend2D bencharking tool now has Skia support, the comparison is shown on the website
  • Direct2D is not considered at the moment as I don't really use Windows for development. Contributions are welcome, but this is not something I would want to do.
  • FastUIDraw project died and is not supported anymore, thus I'm not considering using it or comparing against it.

from blend2d.

LifeIsStrange avatar LifeIsStrange commented on May 25, 2024 2

It would be nice to add Fastuidraw to the benchmarcks, it seems to be the only 2D renderer to have benchmarcks being many times faster than the current state of the art: Skia.

https://github.com/intel/fastuidraw

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024 2

I have managed to build Skia via vcpkg and I have already a local branch that can test Skia with bl_bench. After this is merged I would close this issue as I'm not planning to test against Direct2D or FastUIDraw in near future (I don't really have time for that). If there is anyone willing to add Direct2D to bl_bench I would be happy though.

from blend2d.

rubenvb avatar rubenvb commented on May 25, 2024 1

Skia's build system is indeed somewhat esoteric and non-friendly to outsiders. I have a functional CMake setup to build Skia in my Skui project here (it's inside the third party submodule and currently at a somewhat older version of Skia: m67):
https://github.com/skui-org/skui

If you run cmake in a recursive clone of skui, and then build the "skia" target you should be good to go. I haven't done anything wrt installing it as a separate lib with headers though (on my todo list) so perhaps reusing the "3rdparty" repo is the easiest way to get a build of Skia working.

I can't promise anything on implementing a benchmark in blend2d, but I'm interested so if I find the time to help, something might pop up here.

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024 1

I think it's the opposite - GTK is abandoning the immediate rendering model by introducing a scenegraph toolkit, which makes sense for UI where you only want to redraw what actually changed, or to redraw everything if there was changed too much. With scenegraph this becomes manageable.

However, I'm not sure how this could be used to benchmark Blend2D, which implements immediate rendering model at the moment - I'm not sure it would make sense to add scene-graph to Blend2D, more likely to have another library that implements it.

I think the best comparison would be with something GPU optimized which implements immediate mode, fastuidraw and SKIA would be good candidates.

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024

NVPR: I'm interested in this technology, but I think it would be fair to wait for multithreading before starting the comparison of software-based 2D against dedicated GPUs. As written on the website, Blend2D was written to make software-based 2D rendering faster so at the moment we compare with other software-based 2D renderers. I cannot comment ARM platforms atm as the work on ARM hasn't started yet.

SKIA: I tried building SKIA twice and was not successful with that. Since they use build system that I don't understand and that has minimum documentation I decided to not spend more time on this. Now when Blend2D is finally out anyone is welcome to contribute SKIA module to bl-bench tool. I'm wondering myself about the performance. So far the performance can only be extrapolated based on caskbench tool, which from 2014.

from blend2d.

FabriceSalvaire avatar FabriceSalvaire commented on May 25, 2024

I retrieved the page https://www.slideshare.net/Mark_Kilgard/22pathrender p41 p42 should come from a Nvidia talk

from blend2d.

yzrmn avatar yzrmn commented on May 25, 2024

https://www.slideshare.net/Mark_Kilgard/22pathrender

Currently, we are offsetting curves to stroke a path. It means that the rendering of Blend2D from page 41 will look similar to Skia and Qt. According to SVG this is expected behavior (https://www.w3.org/TR/SVG2/painting.html#StrokeShape). I think it would be technically possible to make it look like e.g. OpenVG Reference but it might be expensive to do so.

The rendering from page 42 should be no problem :)

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024

I'm wondering about the path from page 42, is there any data?

from blend2d.

yzrmn avatar yzrmn commented on May 25, 2024
moveTo(300, 300);
cubicTo(310, 301, 310, 309, 300, 310);

image

Not exactly the same, but something like that...

from blend2d.

melroy89 avatar melroy89 commented on May 25, 2024

Well better add SDL and/or SFML to the list as well. Which are the most commonly used multimedia libraries out there (besides from the way too huge Skia).

EDIT: GTK4 is moving away from Cairo and directly using OpenGL/Vulkan calls. So keep an eye on them. Also Qt / Qt Quick is moving away from their QPainter and using hardware rendering as well (like using Scene Graph).

from blend2d.

LifeIsStrange avatar LifeIsStrange commented on May 25, 2024

@Danger89 interesting, I'm not an expert but does that means they'll switch from a retained renderer to an immediate mode? If so it is known to be suboptimal for 2D guis and scrolling.
Moreover skia has openGL and Vulkan backends so I don't see how this would be superior. No idea what is Scene Graph though, I should look into it

from blend2d.

dumblob avatar dumblob commented on May 25, 2024

Time has passed and Skia comparison would be really interesting.

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024

The benchmarking suite and samples will soon use Conan to fetch dependencies (both Cairo and Qt, and maybe even AGG). If anyone is willing to add a SKIA recipe to conan-center-index (issue here: conan-io/conan-center-index#2389) then I would implement the rest (SKIA benchmark module).

I would like to avoid maintaining build scripts to build SKIA and its dependencies, it's just too fragile and I prefer doing more interesting things instead.

from blend2d.

dumblob avatar dumblob commented on May 25, 2024

I would like to avoid maintaining build scripts to build SKIA and its dependencies, it's just too fragile and I prefer doing more interesting things instead.

I totally support this. I think it would be of enormous value even if the SKIA benchmark would be unmaintained (i.e. would become "old" soon) after benchmarking.

from blend2d.

projectitis avatar projectitis commented on May 25, 2024

A benchmark comparison with ThorVG would be very interesting, too. ThorVG is a dependency-free lightweight software renderer that utilizes threading. It's scene-based, but currently no partial redraw is supported as far as I know, so comparisons would be fair :)

I've just been working on updating the ThorVG renderer for Rive files (here), and I am wondering if I should try a Blend2D version next.

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024

I think Blend2D would beat ThorVG SW renderer significantly, because ThorVG is basically using FreeType code, which was not written for performance. I would assume ThorVG and Qt to give you similar performance (ThorVG maybe worse in some cases as it has very limited SIMD use, Qt at least has SIMD composition).

from blend2d.

projectitis avatar projectitis commented on May 25, 2024

I agree. ThorVG was created to run on low resource devices, like smart TVs, so performance was not the top priority. However I would be interested to see exactly what the difference is :)

from blend2d.

kobalicek avatar kobalicek commented on May 25, 2024

I'm closing this issue, please open a new one if you miss a library to be benchmarked against, and if possible, provide an implementation as well, as for me the currently benchmarked libraries are enough to get an overview of Blend2D performance and optimization opportunities.

from blend2d.

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.