Open Gavcheg opened 7 years ago
Yes, the rendering is done in 2 passes.
The Expose event handler uses the fast interpolation GDK_INTERP_NEAREST to scale the picture and registers an idle callback. When the callback is called, the more accurate and slow GDK_INTERP_BILINEAR interpolation is used to scale and draw the image once again.
That results in some flickering but makes the GUI more responsive.
I hope I'll implement a more sophisticated caching and preloading mechanism some day, so when a user navigates back and forth between multiple images, the flickering will not be noticeable in the most cases.
Problem is then we open large image and left to another one, we see that image refresh second time, after it displayed previously. Looks like some filter is applied after image is loaded and showed.