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

Cache context attributes for the rendering context; #20532 #21816

Closed
wants to merge 1 commit into from

Conversation

@sumit0190
Copy link
Contributor

sumit0190 commented Sep 26, 2018

Cache context attributes when creating webglrenderingcontext


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #20532 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because there's no direct way to test it.

This change is Reviewable

@ghost
Copy link

ghost commented Sep 26, 2018

No Taskcluster jobs started for this pull request
The `allowPullRequests` configuration for this repository (in `.taskcluster.yml` on the
default branch) does not allow starting tasks for this pull request.
@highfive
Copy link

highfive commented Sep 26, 2018

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @asajeffrey (or someone else) soon.

@highfive
Copy link

highfive commented Sep 26, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webglrenderingcontext.rs
  • @KiChjang: components/script/dom/webglrenderingcontext.rs
@highfive
Copy link

highfive commented Sep 26, 2018

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
// Therefore, the values we had cached away when we instantiated
// the context stay the same, and can be safely returned back
// to the user.
return Some(WebGLContextAttributes {

This comment has been minimized.

Copy link
@CYBAI

CYBAI Sep 27, 2018

Collaborator

Maybe you won't need return here? Also, it would be great to indent one more tab inside the function!

fn GetContextAttributes(&self) -> Option<WebGLContextAttributes> {
    // Currently ...
    Some(WebGLContextAttributes {
        ...
    })
}

This comment has been minimized.

Copy link
@sumit0190

sumit0190 Oct 1, 2018

Author Contributor

Will do; just gonna wait for some other feedback and bundle up the changes if possible.

premultipliedAlpha: self.attrs.premultipliedAlpha,
preserveDrawingBuffer: self.attrs.preserveDrawingBuffer,
stencil: self.attrs.stencil,
})

This comment has been minimized.

Copy link
@nox

nox Oct 1, 2018

Member

Why not just return self.attrs?

This comment has been minimized.

Copy link
@sumit0190

sumit0190 Oct 1, 2018

Author Contributor

Borrow checker doesn't like that. I also can't use clone here, I literally have to create a new object.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 2, 2018

The latest upstream changes (presumably #21825) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey
Copy link
Member

asajeffrey commented Aug 19, 2019

@sumit0190 Are you still working on this?

@asajeffrey
Copy link
Member

asajeffrey commented Sep 27, 2019

@sumit0190 Ping?

@sumit0190
Copy link
Contributor Author

sumit0190 commented Sep 27, 2019

Sorry about that; I missed the earlier ping completely.

I'll check if the PR is still valid - not sure if the comments I added are still true or not (haven't been keeping up with all the changes).

@asajeffrey
Copy link
Member

asajeffrey commented Jan 6, 2020

@sumit0190 another ping?

@asajeffrey
Copy link
Member

asajeffrey commented Feb 24, 2020

I'll close this for now, but feel free to reopen it!

@asajeffrey asajeffrey closed this Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.