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 upUpdate the sample app to demonstrate clipping and scrolling #1151
Conversation
|
r? @mrobinson |
|
FWIW I would really like it if this landed and then was kept up to date by subsequent changes to the clipping API. |
|
Apologies for an unpopular opinion. This is great thing to have in a sample, but I feel that it's big enough to deserve its own executable. |
That sounds like a good idea to me. |
|
That sounds reasonable to me as well. I'll update the PR next week. |
|
That sounds like a great idea. |
Move the sample app from sample/src/main.rs to webrender/examples/basic.rs As suggested in #1151 this moves the existing sample app to be an "example" of the webrender library. As it gets built when running `cargo test` on the webrender library, it doesn't need separate build steps in the travis/appveyor CI configs. I'm not sure why the sample app pulled in webrender_traits `default_features = false` but I dropped that when migrating the Cargo.toml spec, since there doesn't seem to be a way of specifying it just for a particular example. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1160) <!-- Reviewable:end -->
|
|
|
Updated PR to be rebased on top of #1160. This now adds an examples/scrolling.rs example app that demonstrates scrolling. The app is mostly what I had before (the old sample app with my scrolling changes) but now I ripped out all the stuff not related to scrolling as well (like the blob image stuff and touch-gestures stuff). The interesting part of the app is around line 145 in scrolling.rs, inside the |
|
It probably makes sense to put all the common init code in a shared file for all examples to use, but that can be done once we have a few examples and a better idea of which code can be shared. @bors-servo r+ |
|
|
Update the sample app to demonstrate clipping and scrolling This adds some stuff to the sample app that demos clipping and scrolling, including nested scrolling. It also adds a paragraph to the CLIPPING.md detailing the behaviour when multiple define_clip calls are made with the same clip id. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1151) <!-- Reviewable:end -->
|
|
Update clipping documentation When I updated the commit in #1151 I forgot to include the CLIPPING.md changes. I still think they're worth keeping though, so here they are. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1166) <!-- Reviewable:end -->
staktrace commentedApr 21, 2017
•
edited by larsbergstrom
This adds some stuff to the sample app that demos clipping and scrolling, including nested scrolling. It also adds a paragraph to the CLIPPING.md detailing the behaviour when multiple define_clip calls are made with the same clip id.
This change is