Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement fill_rect for surface pattern with repetition style. #160
Conversation
|
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. |
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 |
| unsafe { | ||
| AzDrawTargetFillRect(self.azure_draw_target, | ||
| &mut rect.as_azure_rect(), | ||
| &mut draw_rect.as_azure_rect(), |
This comment has been minimized.
This comment has been minimized.
pcwalton
May 29, 2015
Contributor
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.
|
@pcwalton I was concerned about generating duplicate code if there are several callers of fill_rect. |
|
@pcwalton assigned to you. And ping. |
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
hyowon commentedMay 19, 2015
SurfacePattern has ExtendMode::REPEAT.
Clipping is used to handle 'repeat-x', 'repeat-y' and 'no-repeat'.