Skip to content

Commit

Permalink
Auto merge of servo#769 - nical:pending-epochs, r=glennw
Browse files Browse the repository at this point in the history
Add a way to be notified when new epochs have been rendered.

This makes it possible for Gecko to send notifications back to the content process for each rendered transaction.

<!-- 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/769)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo authored Jan 25, 2017
2 parents 2353f27 + bb994be commit bcf3c37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webrender/src/renderer.rs
Original file line number Diff line number Diff line change
@@ -741,6 +741,12 @@ impl Renderer {
self.pipeline_epoch_map.get(&pipeline_id).cloned()
}

/// Returns a HashMap containing the pipeline ids that have been received by the renderer and
/// their respective epochs since the last time the method was called.
pub fn flush_rendered_epochs(&mut self) -> HashMap<PipelineId, Epoch, BuildHasherDefault<FnvHasher>> {
return mem::replace(&mut self.pipeline_epoch_map, HashMap::with_hasher(Default::default()));
}

/// Processes the result queue.
///
/// Should be called before `render()`, as texture cache updates are done here.

0 comments on commit bcf3c37

Please sign in to comment.