aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/imagedata.rs
Commit message (Collapse)AuthorAgeFilesLines
* Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2dAnthony Ramine2018-11-201-2/+3
| | | | This avoids a copy in the case of textures coming from HTMLImageElement.
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Prefix some pixels functions with rgba8_Anthony Ramine2018-11-161-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Reorder importsPyfisch2018-11-061-3/+3
|
* `cargo fix --edition`Simon Sapin2018-11-061-6/+6
|
* Handle some transparent black cases in ctx.getImageDataAnthony Ramine2018-10-071-20/+2
|
* Avoid copying pixels in ctx.putImageData sometimesAnthony Ramine2018-10-061-32/+36
|
* Introduce ImageData::get_rectAnthony Ramine2018-10-061-1/+32
| | | | | | | We use that to send only the pixels that will be actually drawn to the canvas thread in CanvasRenderingContext2d::PutImageData. We also make the canvas thread byte swap and premultiply colours in-place.
* Make HTMLCanvasElement::get_size return a Size2D<u32>Anthony Ramine2018-10-021-2/+2
| | | | The changes keep trickling down.
* Format script componentchansuke2018-09-191-19/+27
|
* Fix the build for NLLSimon Sapin2018-08-241-1/+1
| | | | | | Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build` https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
* Revert "Fix the build for NLL"Josh Matthews2018-08-071-1/+1
| | | | This reverts commit d1733aa5029c5b97390a236d94eed916ddb64577.
* Fix the build for NLLSimon Sapin2018-08-081-1/+1
| | | | | | Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build` https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
* Use safe NonZero constructor instead of an explicit null checkSimon Sapin2018-01-221-2/+1
|
* Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>Simon Sapin2018-01-221-3/+3
|
* Fix tyvar_behind_raw_pointer warningsSimon Sapin2018-01-101-2/+2
| | | | https://github.com/rust-lang/rust/issues/46906
* Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.Simon Sapin2017-10-161-3/+3
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | 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 dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)Simon Sapin2017-07-271-1/+1
|
* Untry scriptSimon Sapin2017-06-181-2/+2
|
* Bump euclid to 0.14.Nicolas Silva2017-06-141-1/+1
|
* Make ImageData::new return Fallible instead of panicLucjan Suski2017-03-201-2/+6
|
* Implement ImageData constructors #15671montrivo2017-03-141-10/+81
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Update js.Ms2ger2017-02-151-4/+11
| | | | Fixes #15553.
* Remove warnings about unnecessary mutability.Alan Jeffrey2017-01-281-1/+1
|
* Use the typed array APIs in ImageData.Ms2ger2017-01-091-20/+11
|
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-2/+2
| | | | rebase + marked the necessary new code as unsafe
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+2
|
* Compile WebIDL return type "object" to NonZero<*mut JSObject>Anthony Ramine2016-08-301-2/+4
|
* Don't bother with the global in ImageData::get_image_dataAnthony Ramine2016-08-301-3/+3
|
* Assert that ImageData::data is not nullAnthony Ramine2016-08-301-0/+3
|
* Update SpiderMonkeyAnthony Ramine2016-05-031-2/+7
|
* Remove `#[allow(raw_pointer_derive)]` attributesBrandon Fairchild2015-11-271-1/+0
| | | | | | The attributes are unused. Fixes #8699.
* more refactoringrohan.prinja2015-10-301-1/+1
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+2
|
* Merge adjacent identical `impl` sectionsCorey Farwell2015-08-281-3/+0
| | | | | Prior to #7416 and #7401, many of these `impl` sections were not identical
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-4/+4
|
* Remove helper traitsAnthony Ramine2015-08-271-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* sort all usesJohann Tuffe2015-08-201-3/+3
|
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-0/+1
|
* Upgrade to SM 39Michael Wu2015-06-191-22/+22
|
* Use euclid from crates.ioecoal952015-06-191-1/+1
|
* rust-geom API changesCorey Farwell2015-06-131-1/+1
| | | | https://github.com/servo/rust-geom/pull/81
* Audit and reduce unstable usage in scriptManish Goregaokar2015-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons behind existing unstable features: alloc: - `Rc.make_unique()` - `into_raw` / `from_raw` (naming). All over the bindings code. collections: - `Vec.push_all()` - `from_str` - can be replaced by `.to_owned()` - `from_raw_buf` - could be done directly core: - `nonzero` - `UnsafeCell` (`as_unsafe_cell`) - `Zeroable` - `Peekable.is_empty` std_misc: - Handle stuff
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-1/+1
|