Repository navigation
Add a few comments to the code. - #488
Conversation
|
@glennw r? Don't hesitate to rephrase/complete the comments in the review, I'll update the commits. In particular I didn't manage to properly word the difference between Frame and Scene, and some structures have "Packed-" equivalents and I am not sure if it is a memory optimization or something that ends up in a gl buffer object. |
| } | ||
| } | ||
|
|
||
| // Mostly wraps a tiling::Frame, adding a bit of extra information. |
There was a problem hiding this comment.
wrong comment style? // instead of ///
| pub combined_local_viewport_rect: Rect<f32>, | ||
|
|
||
| // World transform for the viewport rect itself. | ||
| // World transform for the viewport rect itself. |
| use offscreen_gl_context::GLContextDispatcher; | ||
|
|
||
| /// The render backend is responsible for transforming high level display lists into | ||
| /// GPU-friendly work which is then submitted to thre renderer. |
There was a problem hiding this comment.
might be worth mentioning that it produces frames (Frame), which are sent to the renderer
| let prim_bounding_rect = ctx.prim_store.get_bounding_rect(prim_index); | ||
|
|
||
| // If an opaque primitive covers a tile entirely, we can discard | ||
| // all primitives underneith it. |
|
|
||
| /// Mostly wraps a tiling::Frame, adding a bit of extra information. | ||
| pub struct RendererFrame { | ||
| // The last rendered epoch for each pipeline present in the frame. |
|
|
||
| /// Contains scroll and transform information for scrollable and root stacking contexts. | ||
| pub struct Layer { | ||
| // Manages scrolling offset, overscroll state etc. |
There was a problem hiding this comment.
These will need to be fixed too, although not necessarily in your PR since you didn't touch them.
| #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] | ||
| pub struct ScreenTileIndex(usize); | ||
|
|
||
| // For debugging purposes. |
There was a problem hiding this comment.
Let's change it to a real comment, if possible, preceded by ///
|
This looks good to me once kvark's comments are addressed. |
|
☔ The latest upstream changes (presumably #480) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@bors-servo r+ |
|
📌 Commit 14c35a4 has been approved by |
Add a few comments to the code. This isn't much but it's a start and was a good exercise to get started with the code. This PR adds a few comments next to some areas that looked important while not being immediately obvious to me. <!-- 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/488) <!-- Reviewable:end -->
|
☀️ Test successful - status-travis |
This isn't much but it's a start and was a good exercise to get started with the code. This PR adds a few comments next to some areas that looked important while not being immediately obvious to me.
This change is