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

Merged
merged 11 commits into from Jan 9, 2020

Bug 1607419 - Avoid option.expect(&format in hot code. r=jrmuizel

Easy to miss that the slow formatting code is run unconditionally.
The remaining instances are in recording and startup code.

Differential Revision: https://phabricator.services.mozilla.com/D58920

[wrupdater] From https://hg.mozilla.org/mozilla-central/rev/031a2ee21fa6e2b2983b1619ebdf65caa2b882a6
  • Loading branch information
nical authored and moz-gfx committed Jan 8, 2020
commit ac9e68e0191f5e4c8212434a31884dac05af37a1
@@ -1080,7 +1080,7 @@ impl BrushSegment {
let port = frame_state
.surfaces[surface_index.0]
.render_tasks
.expect(&format!("bug: no task for surface {:?}", surface_index))
.unwrap_or_else(|| panic!("bug: no task for surface {:?}", surface_index))
.port;
frame_state.render_tasks.add_dependency(port, clip_task_id);
ClipMaskKind::Mask(clip_task_id)
@@ -1156,7 +1156,7 @@ impl TextureResolver {
TextureSource::External(external_image) => {
let texture = self.external_images
.get(&(external_image.id, external_image.channel_index))
.expect(&format!("BUG: External image should be resolved by now"));
.expect("BUG: External image should be resolved by now");
device.bind_external_texture(sampler, texture);
Swizzle::default()
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.