pub struct RenderStatistics {
pub frames: u64,
pub frame_thread: usize,
pub frame_kind: i32,
pub frame_gl_major_version: i32,
pub frame_width: i32,
pub frame_height: i32,
pub ticks: u64,
pub tick_proxied_calls: Option<u64>,
pub last_proxied_function: i64,
pub canvases_released: u64,
pub render_thread_panics: u64,
}Expand description
What the page can read about the frames that reached its canvases: how many, which thread drew the last one and to what, and what the ticks of a render thread cost the thread of the page.
Not from upstream. With a render worker nothing on the thread of the page sees a frame, so a page (a test, a diagnostic overlay of the host) that wants to know where rendering happens reads it here. The numbers are counted for all canvases of the module.
The fields are read one after the other from counters that the thread that renders goes on writing: two of them may belong to different frames.
Fields§
§frames: u64The frames that were drawn to a canvas since the module started.
frame_thread: usizeThe thread that drew the last frame, as
current_thread
names it there; 0 before the first frame, and always in a build
without threads.
frame_kind: i32The kind of the render target of the last frame:
RENDER_TARGET_KIND_WEB_GL
or
RENDER_TARGET_KIND_SOFTWARE;
0 before the first frame.
frame_gl_major_version: i32The major version of OpenGL ES the last frame was drawn with (2 for WebGL 1, 3 for WebGL 2); 0 for a frame drawn in memory.
frame_width: i32The width of the last frame in device pixels.
frame_height: i32The height of the last frame in device pixels.
ticks: u64The ticks of the frame loop of a render thread since the module started. A tick renders a frame only when something changed. Ticks of the frame loop of the page are not counted.
tick_proxied_calls: Option<u64>The calls the runtime carried from the render thread to the main
thread of the page during those ticks (a call of the C library that
only the main thread can serve: a line on the console, a file);
None when the script of the thread does not count them. While such
a call is served the render thread waits for the thread of the page.
last_proxied_function: i64The index, in the table of the script of the module, of the function of the last such call; -1 when there was none.
canvases_released: u64The canvases of closed views whose render target the thread that
drew to them has released
(RenderTargetBrowserSurface::dispose).
render_thread_panics: u64The panics of the render thread since the module started. A frame
that panics is caught by the render loop, which goes on with the next
tick; each is reported to the thread of the page
(RenderWorker).
Implementations§
Trait Implementations§
Source§impl Clone for RenderStatistics
impl Clone for RenderStatistics
impl Copy for RenderStatistics
Source§impl Debug for RenderStatistics
impl Debug for RenderStatistics
Source§impl Default for RenderStatistics
impl Default for RenderStatistics
impl Eq for RenderStatistics
Source§impl PartialEq for RenderStatistics
impl PartialEq for RenderStatistics
impl StructuralPartialEq for RenderStatistics
Auto Trait Implementations§
impl Freeze for RenderStatistics
impl RefUnwindSafe for RenderStatistics
impl Send for RenderStatistics
impl Sync for RenderStatistics
impl Unpin for RenderStatistics
impl UnsafeUnpin for RenderStatistics
impl UnwindSafe for RenderStatistics
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more