Repository navigation
Implement fill_rect for surface pattern with repetition style. - #160
Conversation
1ab4827 to
77cac5f
Compare
|
I've modified the implementation using clipping because of side-effects. |
|
What side effects did you run into? Tiling manually like this is going to negatively affect performance. |
|
@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. |
77cac5f to
a381538
Compare
Issue #6056 Depends on servo/rust-azure#160 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6157) <!-- Reviewable:end -->
|
Bump; this blocks servo/servo#6157 |
There was a problem hiding this comment.
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.
a381538 to
41dea91
Compare
|
@pcwalton I was concerned about generating duplicate code if there are several callers of fill_rect. |
|
@pcwalton assigned to you. And ping. |
41dea91 to
7386513
Compare
Implement fill_rect for surface pattern with repetition style.
Issue #6056 Depends on servo/rust-azure#160 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6157) <!-- Reviewable:end -->
Issue #6056 Depends on servo/rust-azure#160 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6157) <!-- Reviewable:end -->
…owon:canvas_pattern_fill); r=nox Issue #6056 Depends on servo/rust-azure#160 Source-Repo: https://github.com/servo/servo Source-Revision: 9474e62d38f61f2b3a385ca32d64cab975b014ce
…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
…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
…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
SurfacePattern has ExtendMode::REPEAT.
Clipping is used to handle 'repeat-x', 'repeat-y' and 'no-repeat'.