aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/canvas_paint_thread.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use `IpcSharedMemory` for `Canvas2dMsg::DrawImage` (#30544)Ennui Langeweile2023-10-181-9/+15
| | | | | | | | | * Use `IpcSharedMemory` for `Canvas2DMsg::DrawImage` * Fix `Canvas2dMsg::DrawEmptyImage` crashes * Do not premultiply canvas image data * Move `image_data` back to its original position
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-4/+6
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Try to `use` WebRender types moreMartin Robinson2023-07-101-1/+1
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* feat: shorten thread namesyvt2021-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux kernel imposes a 15-byte limit on thread names[1]. This means information that does not fit in this limit, e.g., the pipeline ID of layout and script threads, is lost in a debugger and profiler (see the first column of the table below). This commit shortens the thread names used in Servo to maximize the amount of information conveyed. It also rectifies some inconsistencies in the names. | Before | After | |-------------------|-------------------| | `BluetoothThread` | `Bluetooth` | | `CanvasThread` | `Canvas` | | `display alert d` | `AlertDialog` | | `FontCacheThread` | `FontCache` | | `GLPlayerThread` | `GLPlayer` | | `HTML Parser` | `Parse:www.examp` | | `LayoutThread Pi` | `Layout(1,1)` | | `Memory profiler` | `MemoryProfiler` | | `Memory profiler` | `MemoryProfTimer` | | `OfflineAudioCon` | `OfflineACResolv` | | `PullTimelineMar` | `PullTimelineDat` | | `ScriptThread Pi` | `Script(1,1)` | | `WebWorker for h` | `WW:www.example.` | | `ServiceWorker f` | `SW:www.example.` | | `ServiceWorkerMa` | `SvcWorkerManage` | | `Time profiler t` | `TimeProfTimer` | | `Time profiler` | `TimeProfiler` | | `WebGL thread` | `WebGL` | | `Choose a device` | `DevicePicker` | | `Pick a file` | `FilePicker` | | `Pick files` | `FilePicker` | [1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars
* Auto merge of #26697 - utsavoza:ugo/issue-11681/22-05-2020, r=jdmbors-servo2020-06-121-5/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement CanvasRenderingContext2d.fillText The PR consists of broadly two main changes: - Implementation of Canvas2dRenderingContext.font - Basic implementation of Canvas2dRenderingContext.fillText Although I am not fully sure about the long term goals for the canvas backend in Servo, I assumed limited scope for font and text handling (should support simple text drawing with font selection) in the current implementation as I believe a more complete implementation would eventually be brought in as a part of #22957. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11681 - [x] There are tests for these changes
| * Derive Serialize and Deserialize traits for font styles for ↵Utsav Oza2020-06-121-1/+0
| | | | | | | | #[cfg_attr(feature = "servo")]
| * Enable textAlign, textBaseline and direction attributes for canvasUtsav Oza2020-06-101-4/+21
| |
| * Implement CanvasRenderingContext2D.font propertyUtsav Oza2020-06-101-0/+1
| |
* | canvas: Don't panic if webrender isn't reachable.Josh Matthews2020-06-101-1/+1
|/
* Proxy all WR interactions for layout/font/script/canvas threads to the ↵Josh Matthews2020-06-091-20/+23
| | | | | | | compositor thread. There is now a single RenderApi that is used, and all transactions are serialized through the compositor.
* Convert all uses of UpdateResources api to use webrender transactions.Josh Matthews2020-05-111-1/+10
|
* Implement CanvasRenderingContext2D.getTransform()pylbrecht2020-02-121-0/+4
|
* Remove dependency of constellation on canvasKunal Mohan2020-02-061-1/+1
| | | | | | move `ConstellationCanvasMsg` to canvas_traits and start canvas paint thread to components/servo. This, however, does not remove dependency for conditional compilation options.
* Don't spam the log if the constellation can't be reached from the canvas thread.Josh Matthews2020-01-311-0/+1
|
* Send fill/stroke style along with drawing messagepylbrecht2020-01-251-8/+19
|
* Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-34/+53
|
* Update webrender and serde_bytesAnthony Ramine2019-11-131-1/+1
|
* Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-101-1/+1
| | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Fix formatting.Josh Matthews2019-06-031-3/+1
|
* Add cargo feature to control canvas backend.Josh Matthews2019-06-031-3/+7
|
* Make CanvasData use GenericDrawTargetpylbrecht2019-05-311-1/+1
|
* Changes for sender recieverMaharsh2019-05-091-1/+1
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-1/+1
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Format remaining filesPyfisch2018-11-061-126/+71
|
* Sort `use` statementsSimon Sapin2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-1/+1
|
* Exit Canvas paint thread on shutdownPaul Rouget2018-10-291-0/+1
|
* Simplify ctx.drawImage a bitAnthony Ramine2018-10-111-8/+4
| | | | There is no need to swap between RGBA and BGRA twice.
* Abstract some stuff common to ctx.getImageData and ctx.putImageDataAnthony Ramine2018-10-081-8/+4
|
* Align ctx.createImageData and ctx.getImageData with the specAnthony Ramine2018-10-061-3/+4
|
* Avoid copying pixels in ctx.putImageData sometimesAnthony Ramine2018-10-061-2/+6
|
* Introduce ImageData::get_rectAnthony Ramine2018-10-061-12/+2
| | | | | | | 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.
* Merge some byte swap/premultiply functions in their own crateAnthony Ramine2018-10-061-1/+2
|
* Make HTMLCanvasElement::get_size return a Size2D<u32>Anthony Ramine2018-10-021-1/+1
| | | | The changes keep trickling down.
* Remove Canvas2dMsg::DrawImageSelfAnthony Ramine2018-09-171-16/+4
| | | | | Now that all canvas share the same thread, it's useless to have a separate message for that.
* Don't create 2D canvas contexts arbitrarilyAnthony Ramine2018-09-161-3/+9
| | | | | Sometimes, the canvas still has no rendering context, in this case it represents a transparent black rectangle.
* Avoid a byte swap roundtripAnthony Ramine2018-09-141-3/+2
|
* Moved Canvas rendering to a single thread.Brody-Eastwood2018-04-231-1090/+233
|
* Add unique canvas IDs to all canvas operations.Brody Eastwood2018-04-021-13/+29
|
* Use ByteBuf for the canvas messagesAnthony Ramine2018-03-261-10/+43
| | | | | The type Vec<u8> is super unefficient to work with in Serde if all you want to represent is a simple blob.
* Update WR (accelerated webgl fix on mac, line decoration optimizations).Glenn Watson2018-03-231-0/+1
|
* Use specific assertion for canvasCYBAI2018-01-251-1/+1
|
* remove unsued IpcReceivertigercosmos2017-12-201-1/+1
|
* Revert "Send IPC receiver for canvas as part of CreateCanvasPaintThread message"Josh Matthews2017-12-181-3/+6
| | | | This reverts commit a504c9358b70fcf02bd8f2067fcbd17d16c89439.
* remove unused `self` in canvas_paint_threadtigercosmos2017-12-171-1/+1
|
* Send IPC receiver for canvas as part of CreateCanvasPaintThread messagetigercosmos2017-12-161-6/+3
|