ElyPDF: the old-tile test checks painted area covers the shown page (R2.6); shorter comments in patch 0041

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 07:25:55 -04:00
1 parent 3c6faf9a6e
commit cc589a07b3
8 files changed
+29 -9

No files matched your search

+3 -2
View File
@@ -70,10 +70,11 @@ fn drawn_tile(image: Arc<RenderImage>, page: usize, view: gpui::Entity<PdfView>)
|_, _, _| {},
move |bounds, _, window, cx| match window.paint_image(bounds, bounds, Default::default(), image, 0, false) {
Ok(()) => view.update(cx, |view, _| {
view.painted += 1;
if view.painted == 1 {
let area = f64::from(f32::from(bounds.size.width) * f32::from(bounds.size.height));
if view.painted == 0.0 && area > 0.0 {
log::info!("pdf: first tile drawn, page {page}");
}
view.painted += area;
}),
Err(error) => log::error!("pdf: drawing a page failed: {error}"),
},