Struct webrender_api::DebugFlags
source · #[repr(C)]pub struct DebugFlags(pub(crate) u32);
Expand description
Flags to enable/disable various builtin debugging tools.
Tuple Fields§
§0: u32
Implementations§
source§impl DebugFlags
impl DebugFlags
sourcepub const PROFILER_DBG: Self = _
pub const PROFILER_DBG: Self = _
Display the frame profiler on screen.
sourcepub const RENDER_TARGET_DBG: Self = _
pub const RENDER_TARGET_DBG: Self = _
Display intermediate render targets on screen.
sourcepub const TEXTURE_CACHE_DBG: Self = _
pub const TEXTURE_CACHE_DBG: Self = _
Display all texture cache pages on screen.
sourcepub const GPU_TIME_QUERIES: Self = _
pub const GPU_TIME_QUERIES: Self = _
Display GPU timing results.
sourcepub const GPU_SAMPLE_QUERIES: Self = _
pub const GPU_SAMPLE_QUERIES: Self = _
Query the number of pixels that pass the depth test divided and show it in the profiler as a percentage of the number of pixels in the screen (window width times height).
sourcepub const DISABLE_BATCHING: Self = _
pub const DISABLE_BATCHING: Self = _
Render each quad with their own draw call.
Terrible for performance but can help with understanding the drawing order when inspecting renderdoc or apitrace recordings.
sourcepub const ECHO_DRIVER_MESSAGES: Self = _
pub const ECHO_DRIVER_MESSAGES: Self = _
Print driver messages to stdout.
sourcepub const SHOW_OVERDRAW: Self = _
pub const SHOW_OVERDRAW: Self = _
Show an overlay displaying overdraw amount.
sourcepub const GPU_CACHE_DBG: Self = _
pub const GPU_CACHE_DBG: Self = _
Display the contents of GPU cache.
sourcepub const TEXTURE_CACHE_DBG_CLEAR_EVICTED: Self = _
pub const TEXTURE_CACHE_DBG_CLEAR_EVICTED: Self = _
Clear evicted parts of the texture cache for debugging purposes.
sourcepub const PICTURE_CACHING_DBG: Self = _
pub const PICTURE_CACHING_DBG: Self = _
Show picture caching debug overlay
sourcepub const PRIMITIVE_DBG: Self = _
pub const PRIMITIVE_DBG: Self = _
Highlight all primitives with colors based on kind.
sourcepub const SMALL_SCREEN: Self = _
pub const SMALL_SCREEN: Self = _
Scale the debug renderer down for a smaller screen. This will disrupt any mapping between debug display items and page content, so shouldn’t be used with overlays like the picture caching or primitive display.
sourcepub const DISABLE_OPAQUE_PASS: Self = _
pub const DISABLE_OPAQUE_PASS: Self = _
Disable various bits of the WebRender pipeline, to help narrow down where slowness might be coming from.
sourcepub const DISABLE_ALPHA_PASS: Self = _
pub const DISABLE_ALPHA_PASS: Self = _
sourcepub const DISABLE_CLIP_MASKS: Self = _
pub const DISABLE_CLIP_MASKS: Self = _
sourcepub const DISABLE_TEXT_PRIMS: Self = _
pub const DISABLE_TEXT_PRIMS: Self = _
sourcepub const DISABLE_GRADIENT_PRIMS: Self = _
pub const DISABLE_GRADIENT_PRIMS: Self = _
sourcepub const OBSCURE_IMAGES: Self = _
pub const OBSCURE_IMAGES: Self = _
sourcepub const GLYPH_FLASHING: Self = _
pub const GLYPH_FLASHING: Self = _
Taint the transparent area of the glyphs with a random opacity to easily see when glyphs are re-rasterized.
sourcepub const SMART_PROFILER: Self = _
pub const SMART_PROFILER: Self = _
The profiler only displays information that is out of the ordinary.
sourcepub const INVALIDATION_DBG: Self = _
pub const INVALIDATION_DBG: Self = _
If set, dump picture cache invalidation debug to console.
sourcepub const PROFILER_CAPTURE: Self = _
pub const PROFILER_CAPTURE: Self = _
Collect and dump profiler statistics to captures.
sourcepub const FORCE_PICTURE_INVALIDATION: Self = _
pub const FORCE_PICTURE_INVALIDATION: Self = _
Invalidate picture tiles every frames (useful when inspecting GPU work in external tools).
sourcepub const WINDOW_VISIBILITY_DBG: Self = _
pub const WINDOW_VISIBILITY_DBG: Self = _
Display window visibility on screen.
sourcepub const RESTRICT_BLOB_SIZE: Self = _
pub const RESTRICT_BLOB_SIZE: Self = _
Render large blobs with at a smaller size (incorrectly). This is a temporary workaround for fuzzing.
sourcepub const SURFACE_PROMOTION_LOGGING: Self = _
pub const SURFACE_PROMOTION_LOGGING: Self = _
Enable surface promotion logging.
source§impl DebugFlags
impl DebugFlags
sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl DebugFlags
impl DebugFlags
sourcepub const fn iter(&self) -> Iter<DebugFlags>
pub const fn iter(&self) -> Iter<DebugFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
sourcepub const fn iter_names(&self) -> IterNames<DebugFlags>
pub const fn iter_names(&self) -> IterNames<DebugFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
source§impl Binary for DebugFlags
impl Binary for DebugFlags
source§impl BitAnd for DebugFlags
impl BitAnd for DebugFlags
source§impl BitAndAssign for DebugFlags
impl BitAndAssign for DebugFlags
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOr for DebugFlags
impl BitOr for DebugFlags
source§fn bitor(self, other: DebugFlags) -> Self
fn bitor(self, other: DebugFlags) -> Self
The bitwise or (|
) of the bits in two flags values.
§type Output = DebugFlags
type Output = DebugFlags
|
operator.source§impl BitOrAssign for DebugFlags
impl BitOrAssign for DebugFlags
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXor for DebugFlags
impl BitXor for DebugFlags
source§impl BitXorAssign for DebugFlags
impl BitXorAssign for DebugFlags
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Clone for DebugFlags
impl Clone for DebugFlags
source§fn clone(&self) -> DebugFlags
fn clone(&self) -> DebugFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DebugFlags
impl Debug for DebugFlags
source§impl Default for DebugFlags
impl Default for DebugFlags
source§fn default() -> DebugFlags
fn default() -> DebugFlags
source§impl<'de> Deserialize<'de> for DebugFlags
impl<'de> Deserialize<'de> for DebugFlags
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Extend<DebugFlags> for DebugFlags
impl Extend<DebugFlags> for DebugFlags
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for DebugFlags
impl Flags for DebugFlags
source§const FLAGS: &'static [Flag<DebugFlags>] = _
const FLAGS: &'static [Flag<DebugFlags>] = _
source§fn from_bits_retain(bits: u32) -> DebugFlags
fn from_bits_retain(bits: u32) -> DebugFlags
source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moresource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moresource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<DebugFlags> for DebugFlags
impl FromIterator<DebugFlags> for DebugFlags
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
source§impl Hash for DebugFlags
impl Hash for DebugFlags
source§impl IntoIterator for DebugFlags
impl IntoIterator for DebugFlags
source§impl LowerHex for DebugFlags
impl LowerHex for DebugFlags
source§impl MallocSizeOf for DebugFlags
impl MallocSizeOf for DebugFlags
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl Not for DebugFlags
impl Not for DebugFlags
source§impl Octal for DebugFlags
impl Octal for DebugFlags
source§impl Ord for DebugFlags
impl Ord for DebugFlags
source§fn cmp(&self, other: &DebugFlags) -> Ordering
fn cmp(&self, other: &DebugFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for DebugFlags
impl PartialEq for DebugFlags
source§fn eq(&self, other: &DebugFlags) -> bool
fn eq(&self, other: &DebugFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DebugFlags
impl PartialOrd for DebugFlags
source§fn partial_cmp(&self, other: &DebugFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &DebugFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DebugFlags
impl Serialize for DebugFlags
source§impl Sub for DebugFlags
impl Sub for DebugFlags
source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§type Output = DebugFlags
type Output = DebugFlags
-
operator.source§impl SubAssign for DebugFlags
impl SubAssign for DebugFlags
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.