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

Slideshow: Use RenderContextGl for LayerRendererGl #10169

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

codewithvk
Copy link
Contributor

Refactored LayerRendererGl to utilize RenderContextGl, replacing repeated functions to reduce code duplication and improve maintainability.

Change-Id: I929ca8bb65897e98a10b4efa92c068a257cd9e16

  • Resolves: #
  • Target version: master

Refactored LayerRendererGl to utilize RenderContextGl, replacing repeated functions to reduce code duplication and improve maintainability.

Signed-off-by: codewithvk <[email protected]>
Change-Id: I929ca8bb65897e98a10b4efa92c068a257cd9e16
@codewithvk codewithvk force-pushed the private/codewithvk/slideshow_improvement_new branch from b50049f to 9a558ab Compare October 4, 2024 03:34
@@ -47,10 +48,8 @@ class LayerRendererGl implements LayerRenderer {

constructor(offscreenCanvas: OffscreenCanvas) {
this.offscreenCanvas = offscreenCanvas;
this.gl = this.offscreenCanvas.getContext('webgl');
if (!this.gl) {
throw new Error('WebGL not supported');
Copy link
Contributor

Choose a reason for hiding this comment

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

please leave this exception, I think we need that for detecting when to use 2d fallback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eszkadev I have tested, It works fine without it as we already throwing error from RenderContextGl constructor so we don't need to worry about it :)

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.

Looks good to me. Thanks!

@mcecchetti mcecchetti merged commit 6b49337 into master Oct 8, 2024
14 checks passed
@mcecchetti mcecchetti deleted the private/codewithvk/slideshow_improvement_new branch October 8, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants