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 #3856

Merged
merged 9 commits into from Feb 12, 2020

Backed out changeset 85ffb2302070 (bug 1600793) for causing crashes r…

  • Loading branch information
Mihai Alexandru Michis authored and moz-gfx committed Feb 11, 2020
commit e1432a72743783a81b579146c7256055ef7c60d3
@@ -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;
@@ -1481,20 +1481,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
@@ -6186,8 +6186,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.