Skip to content
This repository was archived by the owner on Jun 8, 2020. It is now read-only.

Implement fill_rect for surface pattern with repetition style. - #160

Merged
pcwalton merged 1 commit into
servo:masterfrom
hyowon:fill_rect_with_pattern
Jun 11, 2015
Merged

pcwalton merged 1 commit into
servo:masterfrom
hyowon:fill_rect_with_pattern

Conversation

@hyowon

@hyowon hyowon commented May 19, 2015

Copy link
Copy Markdown
Contributor

SurfacePattern has ExtendMode::REPEAT.
Clipping is used to handle 'repeat-x', 'repeat-y' and 'no-repeat'.

@hyowon
hyowon force-pushed the fill_rect_with_pattern branch from 1ab4827 to 77cac5f Compare May 22, 2015 01:46
@hyowon

hyowon commented May 22, 2015

Copy link
Copy Markdown
Contributor Author

I've modified the implementation using clipping because of side-effects.
Instead of clipping, repetitive drawing codes are added for repeat-x and repeat-y.

@hyowon

hyowon commented May 22, 2015

Copy link
Copy Markdown
Contributor Author

cc @jdm
cc @yichoi

@larsbergstrom

Copy link
Copy Markdown
Contributor

r? @metajack or @pcwalton

@pcwalton

Copy link
Copy Markdown
Contributor

What side effects did you run into? Tiling manually like this is going to negatively affect performance.

@hyowon

hyowon commented May 23, 2015

Copy link
Copy Markdown
Contributor Author

@pcwalton I'm sorry for the confusion. The clipping affects all other operations such as composition options. (2d.composite.uncovered.fill.destination-atop test was failed.) However, as you mentioned, repetitive drawing is not good for performance. I noticed just adjusting the destination rect can control the region being painted. Please review again.

@Manishearth

Copy link
Copy Markdown
Member

Bump; this blocks servo/servo#6157

Comment thread src/azure_hl.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just pass rect in directly? I'd rather have the callers of fill_rect do the conversion from rect to draw_rect as necessary and leave this function more or less as is.

@hyowon
hyowon force-pushed the fill_rect_with_pattern branch from a381538 to 41dea91 Compare June 1, 2015 02:57
@hyowon

hyowon commented Jun 1, 2015

Copy link
Copy Markdown
Contributor Author

@pcwalton I was concerned about generating duplicate code if there are several callers of fill_rect.
But now, calculating the draw_rect has only to be moved once.
Please take a look at hyowon/servo@0f84597.

@metajack

metajack commented Jun 1, 2015

Copy link
Copy Markdown
Contributor

@pcwalton assigned to you. And ping.

@hyowon
hyowon force-pushed the fill_rect_with_pattern branch from 41dea91 to 7386513 Compare June 4, 2015 04:37
pcwalton added a commit that referenced this pull request Jun 11, 2015
Implement fill_rect for surface pattern with repetition style.
@pcwalton
pcwalton merged commit b9bb83c into servo:master Jun 11, 2015
@hyowon
hyowon deleted the fill_rect_with_pattern branch June 13, 2015 00:51
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this pull request Jun 12, 2017
…owon:canvas_pattern_fill); r=nox

Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Sep 30, 2019
…owon:canvas_pattern_fill); r=nox

Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce

UltraBlame original commit: f3e3496c1267d50b7ebaada7b343b7fc92fba9b2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
…owon:canvas_pattern_fill); r=nox

Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce

UltraBlame original commit: f3e3496c1267d50b7ebaada7b343b7fc92fba9b2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
…owon:canvas_pattern_fill); r=nox

Issue #6056
Depends on servo/rust-azure#160

Source-Repo: https://github.com/servo/servo
Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce

UltraBlame original commit: f3e3496c1267d50b7ebaada7b343b7fc92fba9b2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants