aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_paint_task.rs
Commit message (Collapse)AuthorAgeFilesLines
* task -> threadrohan.prinja2016-01-101-571/+0
|
* webgl: Create the paint task object in the threadEmilio Cobos Álvarez2016-01-081-6/+12
| | | | | This avoids problems like: https://github.com/servo/servo/issues/9006#issuecomment-170007845
* Update offscreen_gl_contextEmilio Cobos Álvarez2015-12-221-5/+3
|
* Implement WebGL scissor methodDavid Zbarsky2015-12-151-0/+2
|
* Implement various WebGL functionsDavid Zbarsky2015-12-131-10/+179
|
* Fix warnings: use clone_from_slice instead of copy_memoryTetsuharu OHZEKI2015-12-111-2/+1
|
* Auto merge of #8788 - ecoal95:fix-webgl-texturing, r=jdmbors-servo2015-12-041-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Fix texturing These two tiny changes were making WebGL textures not work. It was not seen in our texturing test since it only used one texture, we render to a texture by default, and that texture was bound to `gl::TEXTURE_2D`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8788) <!-- Reviewable:end -->
| * webgl: Ensure we don't generate gl errors in the paint taskEmilio Cobos Álvarez2015-12-041-0/+3
| | | | | | | | | | | | The validations performed in the script side of this should always prevent this from happening, and this will allow us to catch bugs like the previous one.
| * webgl: Fix texturingEmilio Cobos Álvarez2015-12-031-1/+1
| | | | | | | | | | | | | | These two tiny changes were making WebGL textures not work. It was not seen in our texturing test since we render to a texture by default, and that texture was bound to `gl::TEXTURE_2D`.
* | Issue #8462: Add support for BufferSubData, CompressedTexImage2D andSimon Martin2015-12-011-0/+2
|/ | | | CompressedSubTexImage2D and re-enable individual webgl WPT tests.
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-4/+4
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-8/+8
|
* webgl: Add shader validation and translationecoal952015-08-301-17/+4
| | | | | | | | This commit adds angle-based validation and translation to WebGL shaders. The changes to the tex_image_2d test is neccessary (it was not valid GLES 2.0 shader language).
* webgl: Implement multiple calls and improve error detectionecoal952015-08-251-170/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* sort all usesJohann Tuffe2015-08-201-5/+5
|
* script: Make most of 2D canvas and WebGL run over IPC.Patrick Walton2015-07-251-24/+42
| | | | | | 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.
* canvas: Move to shared memory for images and canvas backing stores.Patrick Walton2015-07-241-3/+6
| | | | | | | | | | | | | The idea here is to land this before making images and canvas IPC-safe, because this will shake out bugs relating to the shared memory. There are currently test timeouts that are preventing multiprocess images and canvas from landing, and I believe those are due to the inefficiency of sending large amounts of data in the unoptimized builds we test with. By moving to shared memory, this should drastically reduce the number of copies and `serde` serialization. Under the hood, this uses Mach OOL messages on Mac and temporary memory-mapped files on Linux.
* webgl: Make bind* calls more spec-compliantecoal952015-07-061-4/+10
|
* webgl: Refactor implementation to move logic inside the DOM interfacesecoal952015-07-061-6/+22
| | | | | | | | | | 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).
* Use euclid from crates.ioecoal952015-06-191-1/+1
|
* webgl: Add multiple WebGL calls (activeTexture + blend*)ecoal952015-06-131-53/+150
| | | | | | | | | | | * activeTexture * blendColor * blendFunc * blendFuncSeparate * blendEquation * blendEquationSeparate Blocked on gleam.
* Implement new WebGL interfaces and methodsecoal952015-06-061-22/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* WebGLRenderingContext getters and `getParameter`ecoal952015-06-011-6/+21
| | | | | | This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.
* Add WebGLContextAttributes supportecoal952015-06-011-5/+9
| | | | | | | This commit also: * Allows to return non-rootable dictionaries from Codegen. * Merges the two context types in an enum type.
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-6/+9
| | | | Part of https://github.com/servo/servo/issues/6041
* Layerize canvasecoal952015-05-201-4/+16
| | | | | | | Note that this keeps using readback right now, `NativeSurface` painting will be implemented soon. Also see https://github.com/servo/servo/issues/6142
* Move handling of CanvasWebGLMsgs into WebGLPaintTask::handle_webgl_message.Ms2ger2015-05-141-27/+29
| | | | | This clarifies the code flow in WebGLPaintTask::start a bit, and as a bonus, reduces the line lengths.
* Remove Glutin dependency for WebGLecoal952015-05-071-39/+10
| | | | | | | | | | Now we have mac support, and since android build is broken, we can drop glutin from WebGL code. Went back to upstream (see: https://github.com/servo/rust-offscreen-rendering-context/pull/1#issuecomment-99234534) Rebased
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-5/+4
|
* It implements enough WebGL spec to draw a triangleDiego Marcos2015-05-021-3/+122
|
* WebGL context hardware acceleration + error detectionecoal952015-04-271-42/+63
|
* Remove as_mut_slice() calls.Ms2ger2015-04-261-1/+1
|
* Kicks off a WebGL implementationDiego Marcos2015-04-201-0/+112