зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1691042 - Dump alpha8 mask and glyph textures in frame captures. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D104213
This commit is contained in:
Родитель
8b058fa239
Коммит
0ecd52647b
|
@ -1754,14 +1754,26 @@ impl RenderBackend {
|
|||
&rendered_document.frame.passes,
|
||||
&mut render_tasks_file
|
||||
).unwrap();
|
||||
|
||||
let file_name = format!("texture-cache-color-linear-{}-{}.svg", id.namespace_id.0, id.id);
|
||||
let mut texture_file = fs::File::create(&config.file_path_for_frame(file_name, "svg"))
|
||||
.expect("Failed to open the SVG file.");
|
||||
self.resource_cache.texture_cache.dump_color8_linear_as_svg(&mut texture_file).unwrap();
|
||||
let file_name = format!("texture-cache-glyphs-{}-{}.svg", id.namespace_id.0, id.id);
|
||||
|
||||
let file_name = format!("texture-cache-color8-glyphs-{}-{}.svg", id.namespace_id.0, id.id);
|
||||
let mut texture_file = fs::File::create(&config.file_path_for_frame(file_name, "svg"))
|
||||
.expect("Failed to open the SVG file.");
|
||||
self.resource_cache.texture_cache.dump_glyphs_as_svg(&mut texture_file).unwrap();
|
||||
self.resource_cache.texture_cache.dump_color8_glyphs_as_svg(&mut texture_file).unwrap();
|
||||
|
||||
let file_name = format!("texture-cache-alpha8-glyphs-{}-{}.svg", id.namespace_id.0, id.id);
|
||||
let mut texture_file = fs::File::create(&config.file_path_for_frame(file_name, "svg"))
|
||||
.expect("Failed to open the SVG file.");
|
||||
self.resource_cache.texture_cache.dump_alpha8_glyphs_as_svg(&mut texture_file).unwrap();
|
||||
|
||||
let file_name = format!("texture-cache-alpha8-linear-{}-{}.svg", id.namespace_id.0, id.id);
|
||||
let mut texture_file = fs::File::create(&config.file_path_for_frame(file_name, "svg"))
|
||||
.expect("Failed to open the SVG file.");
|
||||
self.resource_cache.texture_cache.dump_alpha8_linear_as_svg(&mut texture_file).unwrap();
|
||||
}
|
||||
|
||||
let data_stores_name = format!("data-stores-{}-{}", id.namespace_id.0, id.id);
|
||||
|
|
|
@ -1233,10 +1233,18 @@ impl TextureCache {
|
|||
self.shared_textures.color8_linear.dump_as_svg(output)
|
||||
}
|
||||
|
||||
pub fn dump_glyphs_as_svg(&self, output: &mut dyn std::io::Write) -> std::io::Result<()> {
|
||||
pub fn dump_color8_glyphs_as_svg(&self, output: &mut dyn std::io::Write) -> std::io::Result<()> {
|
||||
self.shared_textures.color8_glyphs.dump_as_svg(output)
|
||||
}
|
||||
|
||||
pub fn dump_alpha8_glyphs_as_svg(&self, output: &mut dyn std::io::Write) -> std::io::Result<()> {
|
||||
self.shared_textures.alpha8_glyphs.dump_as_svg(output)
|
||||
}
|
||||
|
||||
pub fn dump_alpha8_linear_as_svg(&self, output: &mut dyn std::io::Write) -> std::io::Result<()> {
|
||||
self.shared_textures.alpha8_linear.dump_as_svg(output)
|
||||
}
|
||||
|
||||
/// Expire picture cache tiles that haven't been referenced in the last frame.
|
||||
/// The picture cache code manually keeps tiles alive by calling `request` on
|
||||
/// them if it wants to retain a tile that is currently not visible.
|
||||
|
|
Загрузка…
Ссылка в новой задаче