Bug 67545 - [Cairo] InterpolationNone for image scaling should use nearest-neighbor scaling
Summary: [Cairo] InterpolationNone for image scaling should use nearest-neighbor scaling
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Martin Robinson
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-09-02 17:51 PDT by Martin Robinson
Modified: 2011-09-09 14:55 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.70 KB, patch)
2011-09-02 17:55 PDT, Martin Robinson
xan.lopez: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2011-09-02 17:51:26 PDT
The problem is readily evident when viewing pixel dump results in GtkLauncher. Instead of using nearest-neighbor scaling the resulting images use CAIRO_FILTER_FAST, which leads to distortion in the output. Scaled images with InterpolationNone should use CAIRO_FILTER_NEAREST.
Comment 1 Martin Robinson 2011-09-02 17:55:29 PDT
Created attachment 106230 [details]
Patch
Comment 2 Xan Lopez 2011-09-02 18:03:51 PDT
Comment on attachment 106230 [details]
Patch

Looks good to me.
Comment 3 Ryuan Choi 2011-09-02 19:13:44 PDT
Comment on attachment 106230 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=106230&action=review

> Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:162
>      case InterpolationNone:
> +        cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_NEAREST);
>      case InterpolationLow:
>          cairo_pattern_set_filter(pattern.get(), CAIRO_FILTER_FAST);
>          break;

IMHO, break looks missing.
Comment 4 Xan Lopez 2011-09-03 04:51:04 PDT
Comment on attachment 106230 [details]
Patch

Absolutely right, break is missing. Sorry about that.
Comment 5 Martin Robinson 2011-09-09 14:55:00 PDT
I don't see this issue any longer oddly enough! I'm going to close for now. I'll reopen if I observe it again.