aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderingcontext.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add WebRender integration to Servo.Glenn Watson2016-02-181-0/+2
| | | | | | | | WebRender is an experimental GPU accelerated rendering backend for Servo. The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used). WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
* Fix #9508: Beautify our union enums constructorsAlexander Lopatin2016-02-071-4/+4
|
* adding image metadata notification capabilities to image cachejmr02016-01-291-1/+2
|
* Remove unused imports in scriptKishor Bhat2016-01-171-1/+0
|
* webgl: Check shader compilation status on use_program.Emilio Cobos Álvarez2016-01-131-2/+4
|
* webgl: Check for bound element array buffer on DrawElementsEmilio Cobos Álvarez2016-01-131-6/+1
| | | | And remove outdated TODOs
* webgl: Check for pending current_program errorsEmilio Cobos Álvarez2016-01-131-4/+8
|
* webgl: Track uniformlocation's programEmilio Cobos Álvarez2016-01-131-8/+21
|
* webgl: Implement Uniform1f, Uniform1fv, and Uniform4fEmilio Cobos Álvarez2016-01-131-10/+41
| | | | | | I was going to implement Uniform4fv with sequences, (since it practically implemented), but we can't until we support Float32Array args because codegen doesn't know how tu differenciate between both.
* Add global default method for Reflectable traitChad Kimes2016-01-111-10/+10
|
* Remove global field from WebGLRenderingContextChad Kimes2016-01-101-11/+9
|
* task -> threadrohan.prinja2016-01-101-3/+3
|
* conversions: Make a `is_type_compatible` method for ArrayBufferViews.Emilio Cobos Álvarez2016-01-041-6/+6
|
* conversions: Add a checked version to array_buffer_view_dataEmilio Cobos Álvarez2016-01-041-8/+7
|
* conversion: Extrapolate array_buffer_view_dataEmilio Cobos Álvarez2016-01-041-24/+24
| | | | And use it instead of the raw jsapi calls.
* webgl: Unify accessing ArrayBufferView objectsEmilio Cobos Álvarez2016-01-041-28/+13
| | | | | | | | | | | | This fixes an invalid length being reported from float32_array_to_slice (which used the byte length), and also to generalize getting data from a JS array buffer view, to reduce code duplication. The pending type safety issues, like where we could send a UInt16Array where we expect a Float32 one, should be solved by IDL bindings in some cases, like uniform[n]fv or vertexAttrib[n]fv, and with extra checks in others, like in the pending texImage2D(..., ArrayBufferView).
* Issue #8738: bufferSubData and texImage2D argument sanity checks.Simon Martin2015-12-261-35/+58
|
* Implement WebGL scissor methodDavid Zbarsky2015-12-151-0/+7
|
* Implement various WebGL functionsDavid Zbarsky2015-12-131-70/+209
|
* Pass around event types as Atoms instead of StringsCorey Farwell2015-12-101-1/+1
| | | | | | `Event` internally stores the `type` as an `Atom`, and we're `String`s everywhere, which can cause unnecessary allocations to occur since they'll end up as `Atom`s anyways.
* Move ScriptMsg from msg crate into script_traitsTomas Cernaj2015-12-091-1/+1
|
* webgl: Add correct error handling to BufferSubDataEmilio Cobos Álvarez2015-12-071-1/+1
| | | | | | From the WebGL spec: > If data is null then an INVALID_VALUE error is generated.
* Issue #6791: Allow more array types in bufferData and bufferSubData.Simon Martin2015-12-061-7/+3
|
* Issue #8462: Add support for BufferSubData, CompressedTexImage2D andSimon Martin2015-12-011-2/+63
| | | | CompressedSubTexImage2D and re-enable individual webgl WPT tests.
* Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-1/+1
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-3/+3
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Use the conversion traits from js.Ms2ger2015-11-121-10/+13
|
* webgl: Implement getSupportedExtensionsEmilio Cobos Álvarez2015-11-111-0/+5
|
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-3/+4
| | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-3/+3
|
* merge from masterrohan.prinja2015-11-031-4/+3
|\
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-4/+3
| |
* | more refactoringrohan.prinja2015-10-301-2/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
|/
* remove get_rooted() and replace all references to it with references to get()rohan.prinja2015-10-291-2/+2
|
* Make unrooted_must_root a bit more aggressive.Eli Friedman2015-10-231-0/+1
| | | | | | | | | Basically, instead of trying to check for specific kinds of statements, just check the types of all local variables. Also included are some commented-out proposals for some slightly more aggressive lints which might be useful (but trigger a little too frequently at the moment).
* Clean up the cast callsAnthony Ramine2015-10-211-5/+2
|
* Introduce trait CastableAnthony Ramine2015-10-211-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Make get() and set() on MutNullableHeap use the correct types.Eli Friedman2015-10-151-1/+1
| | | | | | get() must always return a rooted value, because we have no way of ensuring the value won't be invalidated. set() takes an &T because it's convenient; there isn't any need to expose JS<T>.
* Don't return a JS<T> from bound_texture_for/Eli Friedman2015-10-151-2/+2
| | | | It's never correct to return a JS<T>. Maybe the lint should catch this?
* Stop implementing Copy for JS<T>.Eli Friedman2015-10-151-5/+5
| | | | | A copy of a JS<T> doesn't have the rooting properties of the original, so it makes no sense for it to implement Copy.
* Update script to work with lint changesManish Goregaokar2015-10-161-5/+3
|
* webgl: Implement WebGLContextEvent and use it on context creation errorEmilio Cobos Álvarez2015-10-081-1/+12
| | | | spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
* webgl: texImage2D with a canvas argumentEmilio Cobos Álvarez2015-09-251-22/+30
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-8/+6
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-5/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove needless returnsManish Goregaokar2015-09-041-2/+2
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-65/+65
|
* Remove helper traitsAnthony Ramine2015-08-271-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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