aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglframebuffer.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* webgl: return missing attachment status from framebuffers with no attachments.Josh Matthews2018-09-101-2/+2
|
* webgl: Clear renderbuffers on first read/write operation.Josh Matthews2018-09-101-4/+41
|
* webgl: Check internal format of textures when determining attachment ↵Josh Matthews2018-09-101-2/+2
| | | | completeness.
* webgl: Ensure that framebuffers have a color attachment before reading or ↵Josh Matthews2018-09-101-0/+10
| | | | writing.
* webgl: Mark framebuffers as incomplete if attachments do not meet format ↵Josh Matthews2018-09-101-5/+19
| | | | requirements.
* webgl: Mark zero-sized framebuffers as incomplete attachments.Josh Matthews2018-08-011-1/+5
|
* Store a reference to the WebGLRenderingContext in WebGLObjectAnthony Ramine2018-07-241-38/+42
|
* Implement WebGL getFramebufferAttachmentParameter APIIgor Gutorov2018-03-221-0/+25
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-11/+11
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-5/+5
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-161-21/+20
| | | | | This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.
* Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"Emilio Cobos Álvarez2017-08-161-20/+21
| | | | | This reverts commit 90f55ea4580e2a15f7d70d0491444f18b972d450, reversing changes made to 2e60b27a2186a8cba4b952960155dfcf3f47d7db.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-21/+20
|
* Upgrade to the latest version of WebRenderMartin Robinson2017-07-131-3/+3
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Remove HeapGCValueAnthony Ramine2016-12-121-3/+1
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Expose WebGL-related interfaces only in WindowAnthony Ramine2016-11-301-5/+5
|
* update depsGregory2016-11-221-2/+3
| | | | | | | | | | switch to using webrender_traits::ImageData update use of webrender_traits::StackingContext in layout use webrender_traits::channel::msg_channel in webgl ipc fix use of resource_override_path in components/servo/lib
* webgl: Only update FBO status once in framebufferTexture2D().Eric Anholt2016-11-051-1/+0
| | | | | We update it below after we send the actual FramebufferTexture2D command to the GL.
* webgl: Fix out-of-bounds readpixels handling.Eric Anholt2016-11-051-0/+7
| | | | | | | This fixes the crash in read-pixels-pack-alignment (which was trying to read out of bounds). Fixes #13901
* webgl: Validate that framebuffer attachment sizes match.Eric Anholt2016-11-051-4/+35
| | | | | This is required by the WebGL spec, and we need to figure out the FB size like this for validating ReadPixels.
* webgl: Update FBO status when textures or RBs are reallocated.Eric Anholt2016-11-051-6/+34
| | | | | | FBO status is supposed to depend on the size of the attachments all matching, so we need to re-check when it changes. We don't ensure matching yet, but this will prevent regressions when we do.
* webgl: Don't forget to update FBO status after detaching a texture.Eric Anholt2016-11-051-0/+1
| | | | | We had this in the renderbuffer detach process, but missed it in this one.
* webgl: Don't update texture attachment state if we throw an error.Eric Anholt2016-11-051-5/+5
| | | | | | If we're going to return from this function without updating the underlying GL state because of a WebGLError, we shouldn't have updated our shadow of the GL state.
* webgl: Track the level with texture attachments.Eric Anholt2016-11-051-3/+6
| | | | | | | We need this to be able to get the size of the attached texture for completeness validation. Signed-off-by: Eric Anholt <eric@anholt.net>
* webgl: Re-check FBO status on binding an FBO.Eric Anholt2016-10-251-0/+5
| | | | | | | | | | When the FBO has been unbound, anything that happened to its attachments (deletion, new binding, reallocation) may have caused it to change status. This doesn't change any test results currently, because we're not checking if the attachments are deleted, the wrong size, or have appropriate formats.
* webgl: Detach RBs and textures from the bound FBO on deletion.Eric Anholt2016-10-251-0/+44
| | | | | | | This is part of general GL behavior: when an object is deleted, look through the currently bound objects and detach the deleted object from them. Detaching an object from an FBO causes it to need to be re-checked for its status.
* webgl: Add support for FBO attachments.Eric Anholt2016-10-251-5/+164
| | | | | This allows many FBO tests to start running as their framebuffers start coming back as framebuffer complete.
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+3
|
* webgl: Do validation that the framebuffer is complete for FBO operations.Eric Anholt2016-09-211-0/+7
| | | | | Given that we can't make a complete FBO yet, just return false from the status check.
* Use wrappers for GL IDsAnthony Ramine2016-06-281-7/+13
| | | | See https://github.com/servo/webrender_traits/pull/62.
* Auto merge of #11426 - DDEFISHER:master, r=emiliobors-servo2016-05-291-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes fix #11357 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11426) <!-- Reviewable:end -->
| * Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContextDaniel2016-05-291-0/+12
| |
* | Report use statements that use {} with only one entryCullen Rhodes2016-05-271-1/+1
|/
* #10211: Stop re-exporting webrender_traits WebGL types from canvas_traitsJan-Fabian Humann2016-03-301-4/+5
|
* merge from masterrohan.prinja2015-11-031-1/+7
|\
| * webgl: Add destructors for texture, program, shader, buffer and framebufferEmilio Cobos Álvarez2015-11-011-1/+7
| | | | | | | | | | | | | | | | | | | | This allows to cleanup resources earlier if they stop being used. Right now all resources were cleaned up when the context was destroyed, this is a slightly better approach. We ignore the possible failure of the send() call, since we don't keep track of these resources from the `WebGLRenderingContext` structure, so a texture could be destroyed after the context and give us problems.
* | more refactoringrohan.prinja2015-10-301-1/+1
|/
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove helper traitsAnthony Ramine2015-08-271-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that JSRef<T> is gone, there is no need to have helper traits. On components/script/*.rs: # Remove imports. /^ *use dom::[a-z]+::\{.*Helpers/ { s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/ s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d On components/script/dom/*.rs: # Ignore layout things. /^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; } # Delete helpers traits. /^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D # Patch private helpers. /^impl.*Private.*Helpers/,/^\}$/ { s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/ } # Patch public helpers. /^impl.*Helpers/,/^\}$/ { s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/ /^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/ } The few error cases were then fixed by hand.
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-1/+0
| | | | closes #7357
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-0/+2
|
* script: Make most of 2D canvas and WebGL run over IPC.Patrick Walton2015-07-251-6/+8
| | | | | | To actually make the multiprocess communication work, we'll need to reroute the task creation to the pipeline or the compositor. But this works as a first step.
* address review commentsecoal952015-07-061-5/+5
|
* webgl: Make bind* calls more spec-compliantecoal952015-07-061-3/+5
|