Skip to content
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

Flawed resampling of downscaled images #21483

Open
HellDunkel opened this issue Aug 22, 2018 · 1 comment
Open

Flawed resampling of downscaled images #21483

HellDunkel opened this issue Aug 22, 2018 · 1 comment

Comments

@HellDunkel
Copy link

@HellDunkel HellDunkel commented Aug 22, 2018

I originally created this issue in the webrender repository. Apparently it is no webrender issue.

servo_downsampling

It seems scaled bitmaps (displayed smaller than acutal size) are not properly resampled and therefore show artefacts. I have just started to dive into webrender and so far have only a limited understanding of the webrender approach to rendering. My view on the topic is the following:

In order to display scaled bitmaps at the best possible quality they need to be resampled. It is a crucial question of design when/how often this is done as is usually involves creating/destroying buffers and a somewhat costly resampling step.

What is the overall design approach here? I could think of a few but am very unsure if they fit in.

Ideas:

  • upsampling images should be avoided, zoomed images can be sampled using the GPUs built-in bilinear filtering

  • live downsampling via mipmaps is a workaround to downsampling. It is unclear if this fits into the overall design. It probably makes no sense to generate mipchains for each image as they consume memory and bandwidth.

  • dynamic downsampling provides the best image quality. Probably uploading the original image to the GPU is a good idea. Resampling can be done efficiently using separable filters on the gpu. This involes intermediate buffers.

@jdm jdm added the A-gfx/rendering label Aug 22, 2018
@atouchet
Copy link
Contributor

@atouchet atouchet commented Aug 22, 2018

WebRender issue: servo/webrender#2978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.