summaryrefslogtreecommitdiffstats
path: root/gfx/wr/webrender/src/render_task_graph.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/webrender/src/render_task_graph.rs')
-rw-r--r--gfx/wr/webrender/src/render_task_graph.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/gfx/wr/webrender/src/render_task_graph.rs b/gfx/wr/webrender/src/render_task_graph.rs
index 29ecf66a2e..6c02de8b65 100644
--- a/gfx/wr/webrender/src/render_task_graph.rs
+++ b/gfx/wr/webrender/src/render_task_graph.rs
@@ -445,6 +445,13 @@ impl RenderTaskGraphBuilder {
)
};
+ if surface_size.is_empty() {
+ // We would panic in the guillotine allocator. Instead, panic here
+ // with some context.
+ let task_name = graph.tasks[task_id.index as usize].kind.as_str();
+ panic!("{} render task has invalid size {:?}", task_name, surface_size);
+ }
+
let format = match kind {
RenderTargetKind::Color => ImageFormat::RGBA8,
RenderTargetKind::Alpha => ImageFormat::R8,