aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/paint_context.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove some unused gfx code.Ms2ger2016-10-281-2029/+0
|
* Auto-generate 'image-rendering' using 'single_keyword'Ravi Shankar2016-10-261-1/+1
|
* Change 'image_rendering' enum variants to snake casesRavi Shankar2016-10-071-2/+2
|
* Add support for background-repeat: space and roundMartin Robinson2016-09-221-5/+7
| | | | | This adds support for more background-repeat modes using the legacy rendering backend.
* Reorder `use` statementsUK9922016-09-091-6/+6
|
* Update euclid to 0.10.1Anthony Ramine2016-08-211-15/+14
|
* Update to euclid 0.8Martin Robinson2016-08-121-31/+31
|
* Simplify and extend trans-stacking-context subpixel accumulationMartin Robinson2016-08-051-8/+12
| | | | | | | | | | Simplify the situations in which subpixels are accumulated, so that it is only done for translation or identity transformation matrices. Also, apply accumulated subpixels to more operations in PaintContext. This fixes several pre-existing reftests and hopefully will eliminate off-by-one errors in flaky reftests. Fixes #10881.
* Accumulate subpixels through stacking contextsMartin Robinson2016-07-271-9/+12
| | | | | | | | | | | | Instead of simply rounding layer origins and discarding subpixel offsets, accumulate them by transforming them into the space of the next child stacking context. This is an attempt to eliminate subpixel differences that are caused by different stacking context boundaries in reference tests. Currently these accumulated subpixels are only used for text positioning, but the plan is that they can be used for all drawing in the future.
* Move some unit type definitions to style_traits.Ms2ger2016-07-111-1/+2
|
* Add style check, test, and code fixes for an else brace check.Travis Dean2016-07-041-2/+5
|
* Remove empty lines following braces.Josh Matthews2016-05-271-2/+0
|
* Make `text-align: justify` incremental layout safeUlf Nilsson2016-05-101-1/+5
|
* Filter out whitespace glyphs from display listMatt Brubeck2016-05-051-10/+12
| | | | Fixes #10244.
* Use byte indices instead of char indices for text runsMatt Brubeck2016-04-281-6/+5
| | | | | | | Replace character indices with UTF-8 byte offsets throughout the code dealing with text shaping and breaking. This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.
* gfx: Allow images to be shipped to the WebRender thread without shippingPatrick Walton2016-03-221-9/+10
| | | | | | | | | over the data as well. WebRender doesn't need the data, as it acquires it separately. About a 50%-100% improvement in display list building time on browser.html.
* Deny unsafe code in more crates.Ms2ger2016-03-181-0/+1
|
* Move util::range into its own crateJonathan Schuster2016-02-251-1/+1
|
* Auto merge of #9055 - simartin:issue_9042, r=Wafflespeanutbors-servo2015-12-241-3/+3
|\ | | | | | | | | | | | | | | | | | | Issue #9042: Report incorrect number of spaces around => in the style checker Fixes https://github.com/servo/servo/issues/9042 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9055) <!-- Reviewable:end -->
| * Issue #9042: Report incorrect number of spaces around => in the style checker.Simon Martin2015-12-231-3/+3
| |
* | Move LayerKind and ScrollPolicy enums to gfx_traitsBrandon Fairchild2015-12-201-2/+1
|/ | | | | | This also moves LayerId and LayerProperties to gfx_traits. Fixes #8836.
* Replaced ZERO_POINT with Point2D::zero()Alexander Mankuta2015-12-031-3/+3
|
* Replaced ZERO_RECT with Rect::zero()Alexander Mankuta2015-12-031-2/+2
|
* Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)Manish Goregaokar2015-11-271-3/+2
| | | | … and libc 0.2 and many other dependencies
* Change PaintContext rects to TypedRects #7023Maciej Skrzypkowski2015-11-041-36/+39
| | | | | Needs update to_nearest_pixel method in app_unit module. Argument of to_nearest_pixel should be: ScaleFactor<PagePx, ScreenPx, f32>
* Handle zero-sized source surfaces properly, and upgrade `ipc-channel` toPatrick Walton2015-09-301-4/+8
| | | | | | | | incorporate the fix for zero-sized shmem on Mac. Depends on servo/rust-azure#201 and pcwalton/ipc-channel#10. Closes #7422.
* Auto merge of #7799 - mbrubeck:glyph-cleanup, r=pcwaltonbors-servo2015-09-301-1/+1
|\ | | | | | | | | | | | | | | | | | | Misc. code cleanup in gfx::text::glyph. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7799) <!-- Reviewable:end -->
| * Remove unused CharIndex field from GlyphIterator::ItemMatt Brubeck2015-09-301-1/+1
| |
* | Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+2
|/
* A few clean ups for Au typeGlenn Watson2015-09-281-3/+3
|
* Auto merge of #7703 - bjwbell:bugfix-0px-and-non-0px-border-widths, r=pcwaltonbors-servo2015-09-241-31/+122
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gfx: Fix border-radius panic when a corner has 0px and >0px borders When one border is 0px and the other is >0px then the border corner drawing code panics when computing the values to use in drawing the border corner arcs. This fixes that bug and makes the `draw_corner` function more robust by explicitly passing an enum, `BorderCorner`, naming which corner is being drawn e.g. `BorderCorner::TL`. Add a ref test, `border_radius_zero_sizes_a.html/border_radius_zero_sizes_ref.html`. Fixes https://github.com/servo/servo/issues/7700. r? @pcwalton or @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7703) <!-- Reviewable:end -->
| * Unabbreviate BorderCorner enum valuesBryan Bell2015-09-221-26/+26
| |
| * Unify two branches of match statement in intersec_ellipse_lineBryan Bell2015-09-211-8/+1
| |
| * Code review nitsBryan Bell2015-09-211-20/+20
| |
| * gfx: Fix border-radius panic when a corner has 0px and >0px bordersBryan Bell2015-09-211-27/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When one border is 0px and the other is >0px then the border corner drawing code panics when computing the values to use in drawing the border corner arcs. This fixes that bug and makes the `draw_corner` function more robust by explicitly passing an enum, `BorderCorner`, naming which corner is being drawn e.g. `BorderCorner::TL`. Add a ref test, `border_radius_zero_sizes_a.html/border_radius_zero_sizes_ref.html`. Fixes https://github.com/servo/servo/issues/7700.
* | sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-7/+5
|/
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-9/+8
| | | | This merges import blocks that were reported by tidy as unmerged.
* Add css twitter fail whale test & update ellipse_to_bezier commentBryan Bell2015-09-181-81/+75
|
* Snap to screen pixels instead of pxMatt Brubeck2015-09-181-78/+89
| | | | Fixes #7665.
* Auto merge of #7559 - ddrmanxbxfr:RFC-0344-Work, r=noxbors-servo2015-09-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server Hi guys, I just gave a big pass of RFC-0344 as per issue #6224 . Pretty much renamed all the get_* fn that were used to fetch values. I hope I didn't rename too much. As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit. I've ran the whole pass of test, everything seems to be still working right :). Please give feedback on this PR. Thanks for looking into it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559) <!-- Reviewable:end -->
| * Remove 'get_*' on getters as per RFC 0344 on various componentsMathieu Rheaume2015-09-121-1/+1
| |
* | gfx: Fix bug with 1px width borders disappearingBryan Bell2015-09-091-1/+30
|/ | | | | | | | | | | | | | | | | | | | | | | | In to_nearest_azure_rect when rounding to pixel coordinates, maintain the invariant of rect non-overlap (if before rounding two rects don't overlap). The previous code rounded the rect top left corner to the nearest pixel with the size rounded to the nearest pixel multiple which can violate the non-overlap condition, e.g. 10px×9.60px at (0px,6.6px) & 10px×9.60px at (0px,16.2px) would round to 10px×10.0px at (0px,7.0px) & 10px×10.0px at (0px,16.0px), which overlap. Instead round each corner to the nearest pixel. For rects that dont need to satify the non-overlap condition and with width or height between 0.5px and 1px, rounding each rect corner to the nearest pixel can yield an empty rect e.g. 10px×0.6px at 0px,28.56px -> 10px×0px at 0px,29px. For this scenario a new function to_nearest_non_empty_azure_rect rounds the rect top left corner to the nearest pixel and the rect size to the nearest pixel multiple. It's possible for non-overlapping rects after this rounding to overlap.
* Auto merge of #7502 - bjwbell:elliptical-borders, r=pcwaltonbors-servo2015-09-041-268/+373
|\ | | | | | | | | | | | | | | | | | | | | | | gfx: Add elliptical border radius support TODO: Add code for parsing shorthand border-radius e.g. "border-radius: 10px 5% / 20px". r? @pcwalton <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7502) <!-- Reviewable:end -->
| * gfx: Add elliptical border radius supportBryan Bell2015-09-041-268/+373
| |
* | Remove needless returnsManish Goregaokar2015-09-041-8/+8
| |
* | Auto merge of #7313 - pcwalton:position-relative-percentage-overflow, r=mbrubeckbors-servo2015-09-011-15/+20
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout: Make overflow calculation take relative percentages into account. This necessitated changing overflow to be calculated by the parent flow if relatively positioned children are present. That is because the overflow regions cannot be calculated without knowing relative offsets, which themselves cannot be calculated without knowing the parent size (because of percentages). To accomplish this without sacrificing parallelism in the non-relative case, this patch splits overflow into "early" and "late" computation. Late overflow computation cannot be parallelized across children, while early overflow computation can. Makes the "Apple Music" text show up over the full-bleed promotional background on apple.com. r? @SimonSapin -- would appreciate a look over the iframe test case that was changed. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7313) <!-- Reviewable:end -->
| * gfx: Make some minor formatting cleanups.Patrick Walton2015-08-311-15/+20
| |
* | gfx: Border radius support for asymmetric bordersBryan Bell2015-08-311-44/+260
|/ | | | | | | | | | | | | | | | | | | | | This change adds support for calculating the correct angle in the border corner arc when switching from one border to another e.g. the left border to the top border. When the border-top/right/bottom/left-widths are not the same, the angle on the border corner arc separating the borders isn't pi/4. For example, if the top border width is much larger than the left border width then most of the border corner should be drawn using the top border color. Elliptical border radii are supported for when elliptical border radii are added. The common case where borders have the same width sets the angle to pi/4 directly. A ref test is also included.
* sort all usesJohann Tuffe2015-08-201-1/+1
|
* Auto merge of #7222 - pcwalton:dashed-border-radius, r=glennwbors-servo2015-08-171-26/+106
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | gfx: Paint dashed borders with nonzero radii the same way Gecko does. It's not ideal, but it was easy to implement and will do for now. Closes #7157. r? @glennw <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7222) <!-- Reviewable:end -->