Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRewrite WebGLRenderingContext to use typed array APIs #15267
Closed
+29
−31
Conversation
highfive
commented
Jan 27, 2017
highfive
commented
Jan 27, 2017
8aa74df
to
366b0e6
366b0e6
to
807adc6
|
r? @jdm |
|
I'm leaving these review comments for posterity; the changes necessary to support typed arrays in the typed array/sequence conversion function were complicated enough that I had to do a bunch of experimentation. |
| @@ -588,10 +589,6 @@ unsafe fn typed_array_or_sequence_to_vec<T>(cx: *mut JSContext, | |||
| <T as FromJSValConvertible>::Config: Clone, | |||
| { | |||
| assert!(!sequence_or_abv.is_null()); | |||
| if let Some(v) = array_buffer_view_to_vec_checked::<T>(sequence_or_abv) { | |||
| return Ok(v); | |||
| } | |||
This comment has been minimized.
This comment has been minimized.
jdm
Feb 2, 2017
Member
This looks like we no longer can deal with passing typed arrays to this function.
| typedarray!(in(_cx) let array_buffer: ArrayBuffer = data); | ||
| let data_vec = match array_buffer { | ||
| Ok(mut data) => data.as_slice().to_vec(), | ||
| Err(_) => try!(fallible_array_buffer_view_to_vec(_cx, data)), |
This comment has been minimized.
This comment has been minimized.
jdm
Feb 2, 2017
Member
Rename _cx to cx since it's used now (and in all other methods that use it after these changes).
|
I addressed my review comments in #15352, which now needs someone else to review the latest commit. |
bors-servo
added a commit
that referenced
this pull request
Feb 2, 2017
…-array-APIs, r=jdm,emilio Rewrite WebGLRenderingContext to use typed array APIs Rewrite WebGLRenderingContext to use typed array APIs. Based on #15267. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14676 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15352) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this pull request
Feb 10, 2017
…-array-APIs, r=jdm Rewrite WebGLRenderingContext to use typed array APIs Rewrite WebGLRenderingContext to use typed array APIs. Based on #15267. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14676 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15352) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
yysung1123 commentedJan 27, 2017
•
edited
Rewrite WebGLRenderingContext to use typed array APIs
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is