Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private/codewithvk/webgl canvas load layer #10114

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

codewithvk
Copy link
Contributor

@codewithvk codewithvk commented Sep 24, 2024

  • Resolves: #
  • Target version: master

Summary

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • Documentation (manuals or wiki) has been updated or is not required
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay

@codewithvk codewithvk force-pushed the private/codewithvk/webgl_canvas_load_layer branch 2 times, most recently from a02ee26 to 67b531b Compare September 29, 2024 16:26
@codewithvk codewithvk marked this pull request as ready for review September 29, 2024 16:32
Copy link
Contributor

@mcecchetti mcecchetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. To try it locally.

@mcecchetti
Copy link
Contributor

mcecchetti commented Sep 30, 2024

While testing it I found the following issues:

  • shapes with an alpha component are rendered in a wrong color
  • shape animations rendering/performance is a lot worse

I reported more details on the related task page

@mcecchetti
Copy link
Contributor

I implemented a patch (#10153) that renders each animation frame directly in the gl canvas provided by RendererLayerGl instead of drawing it earlier in a 2d canvas and then pass the layer as a image bitmap to RendererLayerGl.
Anyway performances are still less smooth than without the RendererLayer patch.
Without RendererLayer patch, Transition2d (and it's sub-classes) which I used for playing transition filters for a shape are not affected by this problem. So, I wonder if the problem is in RendererLayerGl.

@codewithvk
Copy link
Contributor Author

I implemented a patch (#10153) that renders each animation frame directly in the gl canvas provided by RendererLayerGl instead of drawing it earlier in a 2d canvas and then pass the layer as a image bitmap to RendererLayerGl. Anyway performances are still less smooth than without the RendererLayer patch. Without RendererLayer patch, Transition2d (and it's sub-classes) which I used for playing transition filters for a shape are not affected by this problem. So, I wonder if the problem is in RendererLayerGl.

As we are using offscreen GL canvas performance often depends on the device you are using. TBH it's a bit faster for my device not sure why it's slow for you. Maybe we can discuss and stick to 2d canvas if we want.

Copy link
Contributor

@mcecchetti mcecchetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the last commit performances are improved. It's fine to merge for me.

Signed-off-by: codewithvk <[email protected]>
Change-Id: I8068f18cd686ac976f6a64b4d3b4b725eb6fd717
Signed-off-by: codewithvk <[email protected]>
Change-Id: If25ed9ae712365a7ac3a3066e804f00f46fde4bf
Signed-off-by: codewithvk <[email protected]>
Change-Id: I3e84d096a2f8cd386a43190931898110cc29f466
Signed-off-by: codewithvk <[email protected]>
Change-Id: Ia236004c02516c5e491174d172204479b8567b6c
@codewithvk codewithvk force-pushed the private/codewithvk/webgl_canvas_load_layer branch from 3f1f51c to 62fee6b Compare October 2, 2024 14:29
Signed-off-by: codewithvk <[email protected]>
Change-Id: I3cd2363687bfe8e8d054830efce366890c5d5e7c
@codewithvk codewithvk force-pushed the private/codewithvk/webgl_canvas_load_layer branch from 62fee6b to dbbda52 Compare October 2, 2024 17:02
@codewithvk codewithvk merged commit 5385154 into master Oct 3, 2024
14 checks passed
@codewithvk codewithvk deleted the private/codewithvk/webgl_canvas_load_layer branch October 3, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants