aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgltexture.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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 needless returnsManish Goregaokar2015-09-041-7/+7
|
* Remove helper traitsAnthony Ramine2015-08-271-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* webgl: Implement multiple calls and improve error detectionecoal952015-08-251-3/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements WebGL's: * cullFace * frontFace * enable * disable * depthMask * colorMask * clearDepth * clearStencil * depthFunc * depthRange * hint * lineWidth * pixelStorei * polygonOffset * texParameteri * texParameterf * texImage2D (partially) It inlines a lot of OpenGL calls to keep the file `components/canvas/webgl_paint_task.rs` as small as possible while keeping readability. It also improves error detection on previous calls, and sets node damage on the canvas in the drawing calls. It adds a `TexImage2D` reftest, even though it's not enabled because: * WebGL paints the image when it loads (asynchronously), so the reftest doesn't wait for it and it finishes early * If we change the source for the base64 src of the image it works as expected in non-headless mode, but the test harness locks
* 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/+7
| | | | | | 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-2/+3
|
* webgl: Make bind* calls more spec-compliantecoal952015-07-061-1/+1
|
* webgl: Refactor implementation to move logic inside the DOM interfacesecoal952015-07-061-5/+33
| | | | | | | | | | This improves the encapsulation and consistency in our WebGL implementation. Also allows to implement new methods such as `getShaderSource()`. It will also allow us to use `delete()` in the destructors of them (note that we will want to keep track of them from the context).
* Upgrade to SM 39Michael Wu2015-06-191-5/+5
|
* Implement new WebGL interfaces and methodsecoal952015-06-061-0/+39
This commit implements: * WebGLFramebuffer * WebGLRenderbuffer * WebGLTexture And adds the following methods to `WebGLRenderingContext`: * create{Texture,Framebuffer,Renderbuffer} * bind{Texture,Framebuffer,Renderbuffer} * destroy{Buffer,Texture,Framebuffer,Renderbuffer} Fixes: * WebGLUniform location shouldn't inherit from WebGLObject. Known Issues: * WebGL objects have to be destroyed on drop, we may want to keep a reference to the context, or maybe a clone of the renderer to achieve this Also refactors a huge part of the current implementation, to allow failing on creation of different WebGL objects. Blocked on https://github.com/servo/gleam/pull/22 A reftest for most of the added functionality is not doable right now, we need a few more functions in order to upload a texture, for example.