mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Stall PaintTask exit until it can release all buffers
It is possible for a PaintTask to start exiting soon after sending new buffers to the compositor. In that case, the compositor should return the now unnecessary buffers to the PaintTask so that it can properly free them. To accomplish this, the compositor now keeps a hash map of paint task channels per pipeline id. When a PaintTask exists, the constellation informs the compositor that it can forget about it. Additionally, the PaintTask should not wait for any buffers when the engine is doing a complete shutdown. In that case, the compositor is already halted and has simply let all buffers leak. We pipe through the shutdown type when destroying the pipeline to make this decision. Fixes #2641.
This commit is contained in:
parent
141b5d038f
commit
c0b397322f
13 changed files with 180 additions and 103 deletions
|
@ -21,8 +21,7 @@ extern crate "util" as servo_util;
|
|||
|
||||
use gfx::font_cache_task::FontCacheTask;
|
||||
use gfx::paint_task::PaintChan;
|
||||
use servo_msg::constellation_msg::{ConstellationChan, PipelineId};
|
||||
use servo_msg::constellation_msg::Failure;
|
||||
use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId, PipelineExitType};
|
||||
use servo_net::image_cache_task::ImageCacheTask;
|
||||
use servo_net::resource_task::ResourceTask;
|
||||
use servo_util::time::TimeProfilerChan;
|
||||
|
@ -31,7 +30,7 @@ use std::comm::Sender;
|
|||
|
||||
/// Messages sent to the layout task from the constellation
|
||||
pub enum LayoutControlMsg {
|
||||
ExitNowMsg,
|
||||
ExitNowMsg(PipelineExitType),
|
||||
}
|
||||
|
||||
/// A channel wrapper for constellation messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue