-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any reason we can't drop the HTML drawer? #2473
Comments
The HTML drawer continues to be useful for people as a fallback when they have issues with the canvas drawer. The thing that comes to mind is that mobile Safari has issues with large canvasses, so sometimes the HTML drawer is better there. I'd have to dig through the issues to see the last time something like that was discussed. It is definitely a special case thing though... It seems reasonable that we could be moving toward deprecating it somehow. Perhaps at some point it could be spun off as a plugin if there's sufficient interest. Certainly it doesn't need to support the new fancy features (most of which it can't support anyways). Are there ways in which it's getting in the way of continued development? Or just feeling like dead weight? |
I was experimenting with it a bit on the drawer comparison demo and noticed some funky things. For example, the Duomo image at some magnifications has the bottom row misplaced: When I try to load the "Blue B" image, I get the following in the console, and nothing shows up in the viewer: And if I've already navigated around an image with the I don't think I touched any of the relevant code around the HTML drawer pipeline that would explain this, but I suppose it is possible something inadvertent happened. Some of these things I've observed make me wonder if some of the other recent improvement (to the cache, etc) might have already broken some of the HTML drawer abilities. |
When a canvas object is retrieved, the original image data is thrown away to avoid duplicate copies in memory. The Image getter on the older way of 'advanced data pipeline' based on three functions on the tile sources, does not account for this scenario, so the accessed image data is gone. You would have to convert canvas to image here: openseadragon/src/tilesource.js Line 887 in 59645e3
|
Otherwise I also don't see a reason for HTML drawer... |
Well, with version 5 we have officially dropped support for IE11 and have added the WebGL drawer. Maybe it's time to let go of the HTML drawer as well. If people need the HTML drawer, they can fall back to version 4.1.0. That said, I wouldn't want to get rid of it entirely this version, but instead deprecate it. |
I looked into some of the older issues. My impression is that the "problems with canvas" aren't really with Since there is no such size restriction on |
That's how it is implemented btw within cache overhaul - conversion is done only when needed, and drawers define which formats they accept. So if you start with image data and the renderer either supports these or knows how to convert to something it can use, it is preferred over canvas conversion. E.g. WebGL will convert 'image' to 'texture2D'. |
Sounds good :-) |
I think js-canvas is pretty well established at this point. The software-rendering works reasonably well even on modern everyday laptops with no discrete graphics. I've never used or needed the html-drawn viewer. I don't see much reason in keeping this if it is not worth maintaining. That said, I think deprecating it for a bit instead of completely removing it right way makes sense. |
That would be because canvas is processed on CPU.. I think :D |
Yes, precisely. DOM modification is actually quite costly and thus canvas is generally recommended (w3c) for more complex animations and such. |
Sounds like we're in agreement that deprecating the HTML drawer is a reasonable next step. Whether we wait for @Aiosa's cache overhaul PR or not, I think the root of the performance problems that people have been using the HTML drawer to get around is the need for a potentially massive canvas to represent each individual tile for the |
Thinking more about this, in order to not break existing APIs that depend on |
Since we wanted to push v5 (at least I thought so) also with cache overhaul that deprecates |
Per https://caniuse.com/canvas we really don't support any browsers that don't support
canvas
- what's the point of keeping the HTML drawer at this point? Can we just ditch it, or at least deprecate it?The text was updated successfully, but these errors were encountered: