mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1711486 - Show only shared texture cache entries in debug view. r=gfx-reviewers,lsalzman
Otherwise each texture is scaled down to make room for dozens of picture tiles to the point that it's hard to make out whatever is in the textures. We can already see the texture cound via the HUD profiler so it's more useful to only show shared textures and see what's in the atlases. Differential Revision: https://phabricator.services.mozilla.com/D115213
This commit is contained in:
parent
9183c93d76
commit
7d05e7cab0
@ -4929,7 +4929,7 @@ impl Renderer {
|
|||||||
let fb_height = device_size.height;
|
let fb_height = device_size.height;
|
||||||
let surface_origin_is_top_left = draw_target.surface_origin_is_top_left();
|
let surface_origin_is_top_left = draw_target.surface_origin_is_top_left();
|
||||||
|
|
||||||
let num_textures = textures.len() as i32;
|
let num_textures = textures.iter().filter(|t| t.flags().contains(TextureFlags::IS_SHARED_TEXTURE_CACHE)).count() as i32;
|
||||||
|
|
||||||
if num_textures * (size + spacing) > fb_width {
|
if num_textures * (size + spacing) > fb_width {
|
||||||
let factor = fb_width as f32 / (num_textures * (size + spacing)) as f32;
|
let factor = fb_width as f32 / (num_textures * (size + spacing)) as f32;
|
||||||
@ -4952,6 +4952,9 @@ impl Renderer {
|
|||||||
|
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
for texture in textures.iter() {
|
for texture in textures.iter() {
|
||||||
|
if !texture.flags().contains(TextureFlags::IS_SHARED_TEXTURE_CACHE) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let dimensions = texture.get_dimensions();
|
let dimensions = texture.get_dimensions();
|
||||||
let src_rect = FramebufferIntRect::new(
|
let src_rect = FramebufferIntRect::new(
|
||||||
FramebufferIntPoint::zero(),
|
FramebufferIntPoint::zero(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user