debug: Add more tracing for initial operations
This commit is contained in:
parent
23918bf31e
commit
a7116925bf
5 changed files with 24 additions and 0 deletions
|
|
@ -232,6 +232,9 @@ mod imp {
|
|||
pub(super) widget_dimensions: Cell<(i32, i32)>,
|
||||
pub(super) scaling: Cell<f64>,
|
||||
pub(super) surface_signals: OnceCell<SignalGroup>,
|
||||
|
||||
/// Number of snapshots created, debug only
|
||||
pub(super) nth_snapshot: Cell<u8>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
|
|||
|
|
@ -65,6 +65,12 @@ impl WidgetImpl for imp::LpImage {
|
|||
|
||||
let applicable_zoom = self.applicable_zoom();
|
||||
|
||||
let nth_snaphot = self.nth_snapshot.get() + 1;
|
||||
if nth_snaphot < 3 {
|
||||
self.nth_snapshot.set(nth_snaphot);
|
||||
log::trace!("Creating snapshot #{nth_snaphot}");
|
||||
}
|
||||
|
||||
let scaling_filter = if obj.metadata().is_svg() {
|
||||
// Looks better in SVG animations and avoids rendering issues
|
||||
gsk::ScalingFilter::Linear
|
||||
|
|
@ -125,6 +131,10 @@ impl WidgetImpl for imp::LpImage {
|
|||
.add_to_snapshot(snapshot, applicable_zoom, &render_options);
|
||||
|
||||
snapshot.restore();
|
||||
|
||||
if nth_snaphot < 3 {
|
||||
log::trace!("Snapshot #{nth_snaphot} created");
|
||||
}
|
||||
}
|
||||
|
||||
fn measure(&self, orientation: gtk::Orientation, _for_size: i32) -> (i32, i32, i32, i32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue