Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #3861

Merged
merged 4 commits into from Feb 18, 2020

Backed out changeset 80c254f460f5 (bug 1600793) for bustages complain…

  • Loading branch information
bogdantara authored and moz-gfx committed Feb 18, 2020
commit 9f02d49ed835f313a3e293844d28d6b382f86adb
@@ -217,7 +217,6 @@ pub use crate::renderer::{
RendererStats, SceneBuilderHooks, ThreadListener, ShaderPrecacheFlags,
MAX_VERTEX_TEXTURE_WIDTH,
};
pub use crate::internal_types::FastHashMap;
pub use crate::screen_capture::{AsyncScreenshotHandle, RecordedFrameHandle};
pub use crate::shade::{Shaders, WrShaders};
pub use api as webrender_api;
@@ -1485,20 +1485,19 @@ impl RenderBackend {
) {
let requested_frame = render_frame;

let requires_frame_build = self.requires_frame_build();
let doc = self.documents.get_mut(&document_id).unwrap();
// If we have a sampler, get more frame ops from it and add them
// to the transaction. This is a hook to allow the WR user code to
// fiddle with things after a potentially long scene build, but just
// before rendering. This is useful for rendering with the latest
// async transforms.
if requested_frame || has_built_scene {
if let Some(ref sampler) = self.sampler {
frame_ops.append(&mut sampler.sample(document_id,
&doc.scene.pipeline_epochs));
frame_ops.append(&mut sampler.sample(document_id));
}
}

let requires_frame_build = self.requires_frame_build();
let doc = self.documents.get_mut(&document_id).unwrap();
doc.has_built_scene |= has_built_scene;

// If there are any additions or removals of clip modes
@@ -6206,8 +6206,7 @@ pub trait AsyncPropertySampler {
/// This is called for each transaction with the generate_frame flag set
/// (i.e. that will trigger a render). The list of frame messages returned
/// are processed as though they were part of the original transaction.
fn sample(&self, document_id: DocumentId,
doc: &FastHashMap<PipelineId, Epoch>) -> Vec<FrameMsg>;
fn sample(&self, document_id: DocumentId) -> Vec<FrameMsg>;
/// This is called exactly once, when the render backend thread is about to
/// terminate.
fn deregister(&self);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.