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

Move processing of frame messages to before call to build_scene #2866

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Move processing of frame messages to before call to build_scene

  • Loading branch information
hgallagher1993 committed Jul 4, 2018
commit 7c6da8be0781e6f978c9e16d7b30b2d6c5e05cec
@@ -1015,15 +1015,6 @@ impl RenderBackend {
&mut profile_counters.resources,
);

if op.build {
let scene_id = self.make_unique_scene_id();
let doc = self.documents.get_mut(&document_id).unwrap();
let _timer = profile_counters.total_time.timer();
profile_scope!("build scene");

doc.build_scene(&mut self.resource_cache, scene_id);
}

// 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
@@ -1040,6 +1031,15 @@ impl RenderBackend {
op.combine(self.process_frame_msg(document_id, frame_msg));
}

if op.build {
let scene_id = self.make_unique_scene_id();
let doc = self.documents.get_mut(&document_id).unwrap();
let _timer = profile_counters.total_time.timer();
profile_scope!("build scene");

doc.build_scene(&mut self.resource_cache, scene_id);
}

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

if transaction_msg.generate_frame {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.