aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglbuffer.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-2/+2
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* refactor: propagate CanGc arguments through callers (#35591)Auguste Baum2025-02-231-2/+5
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-3/+7
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Move various reflector types and traits to script_bindings (#35279)Josh Matthews2025-02-041-1/+1
| | | | | | | | | | | | | * script: Move Reflector to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add CanGc argument to reflect_dom_object (#34606)Domenico Rizzo2024-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | * applied mach fmt Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Refinements Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Modified reflect_dom_object signature and all its calls Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * fix function calls when parameter is passed up Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-1/+1
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-5/+6
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Replaced failible boolean with an enumTobias Tschinkowitz2020-04-231-11/+10
|
* Auto merge of #25998 - jdm:vao-drop, r=noxbors-servo2020-03-271-2/+2
|\ | | | | | | | | | | | | | | | | Avoid a panic when closing webgl pages using VAOs - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25891 - [x] These changes do not require tests because GC behaviour at shutdown is nondeterministic and difficult to test
| * webgl: Ignore webgl communication errors when dropping vertex array objects.Josh Matthews2020-03-191-2/+2
| |
* | Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|/
* Add initial support for WebGL2 uniform buffer functionsMátyás Mustoha2020-01-091-1/+7
| | | | | | | | | | | | | | | Adds initial support for the following WebGL2 calls: - bindBufferBase - bindBufferRange - getUniformIndices - getUniformBlockIndex - getActiveUniforms - getActiveUniformBlockParameter - getActiveUniformBlockName - uniformBlockBinding See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.16
* Implement the basic WebGL2 buffer data operationsMátyás Mustoha2019-11-051-9/+24
| | | | | | | Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
* Don't panic if WebGL thread can't be reached during finalization.Josh Matthews2019-07-291-8/+12
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-2/+2
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-7/+7
|
* Remove assertion in Drop for WebGLBufferAnthony Ramine2018-10-161-1/+0
|
* Format script componentchansuke2018-09-191-5/+17
|
* Use a bytes channel in BufferDataAnthony Ramine2018-09-071-2/+5
| | | | This means we don't need to copy the input ArrayBuffer at all on the DOM side.
* Simplify WebGLBuffer::buffer_dataAnthony Ramine2018-09-071-11/+2
| | | | | There is no need to pass the target to that buffer method, given the buffer has been retrieved by looking up the one bound to that target in the context.
* Fix Drop assertion for WebGLBufferAnthony Ramine2018-08-291-1/+2
| | | | | A buffer that is dropped may not have been marked for deletion but it must not be attached to any VAO.
* Always use a WebGLVertexArrayObject to handle vertex attribsAnthony Ramine2018-08-021-66/+45
| | | | This lets us clean up how buffers are reference-counted.
* Store a reference to the WebGLRenderingContext in WebGLObjectAnthony Ramine2018-07-241-30/+28
|
* Issue #20556: Implement proper checks in WebGLRenderingContext's bindBuffer().Simon Martin2018-05-101-0/+7
|
* Cache BUFFER_USAGE value on the DOM sideAnthony Ramine2018-04-041-0/+8
|
* Improve WebGLBuffer::buffer_dataAnthony Ramine2018-04-041-6/+14
| | | | It now checks the usage argument itself and use generics for the data vector.
* Use ByteBuf for the canvas messagesAnthony Ramine2018-03-261-1/+5
| | | | | The type Vec<u8> is super unefficient to work with in Serde if all you want to represent is a simple blob.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | 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 dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-161-16/+13
| | | | | 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-13/+16
| | | | | This reverts commit 90f55ea4580e2a15f7d70d0491444f18b972d450, reversing changes made to 2e60b27a2186a8cba4b952960155dfcf3f47d7db.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-16/+13
|
* Upgrade to the latest version of WebRenderMartin Robinson2017-07-131-3/+3
|
* Implement WebGL extensions.Imanol Fernandez2017-05-181-1/+38
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* 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
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+3
|
* Use wrappers for GL IDsAnthony Ramine2016-06-281-8/+15
| | | | See https://github.com/servo/webrender_traits/pull/62.
* Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContextDaniel2016-05-291-0/+8
|
* #10211: Stop re-exporting webrender_traits WebGL types from canvas_traitsJan-Fabian Humann2016-03-301-5/+6
|
* Issue #8738: bufferSubData and texImage2D argument sanity checks.Simon Martin2015-12-261-0/+20
|
* merge from masterrohan.prinja2015-11-031-1/+7
|\