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 upReturn the clip id from push_clip_node. #1333
Conversation
In cases where the caller doesn't pass in an explicit clip id, it is still useful for the caller to get back the generated clip id. This is because the caller may later need to call push_clip_and_scroll_info with the clip id that was generated. If this function doesn't return the clip id the caller would basically have to inline this function and define the clip manually, which seems much less convenient.
|
r? @kvark |
|
Technically, a breaking change. Unlikely to break anyone though. |
|
|
Return the clip id from push_clip_node. In cases where the caller doesn't pass in an explicit clip id, it is still useful for the caller to get back the generated clip id. This is because the caller may later need to call push_clip_and_scroll_info with the clip id that was generated. If this function doesn't return the clip id the caller would basically have to inline this function and define the clip manually, which seems much less convenient. <!-- 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/1333) <!-- Reviewable:end -->
|
@staktrace Hrm. I originally thought of |
|
@mrobinson if you don't feel good about this change, please r- |
|
@mrobinson yeah we can stop using push_clip_node if that's the preferred way forward. I thought it was here to stay as a nice convenience function. |
|
(Aside: is there a way to mark functions as deprecated in rust? If not even some inline comments to that effect would be good here) |
|
@bors-servo r- |
|
@staktrace yeah, #[deprecated]
fn foo() {}
fn main() {
foo();
} |
|
@kvark @staktrace In the end, I didn't r- only because the clipping API is moving a bit slowly in order to make sure that it meets the needs of Gecko. If the |
|
@mrobinson ok, let's re-open if @staktrace has any issues with |
|
Yeah, no problem with using |
|
@staktrace Thanks for the info. I'm tracking the removal here: #1335 |
staktrace commentedJun 2, 2017
•
edited by larsbergstrom
In cases where the caller doesn't pass in an explicit clip id, it is
still useful for the caller to get back the generated clip id. This is
because the caller may later need to call push_clip_and_scroll_info with
the clip id that was generated. If this function doesn't return the clip
id the caller would basically have to inline this function and define
the clip manually, which seems much less convenient.
This change is