Bug 115158
Summary: | Account for CTM scale when deciding the image resampling algorithm. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | Images | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, benjamin, bfulgham, dino, simon.fraser, zalan |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
We might want to consider merging:
https://chromium.googlesource.com/chromium/blink/+/b772b4d7c24b66bebba703fd2ef89fbe73ea1935
Account for CTM scale when deciding the image resampling algorithm.
ImageQualityController considers the image size and layout size when
computing which resampling algorithm to use, but did not account
for the current transform. This was noticable as 'bouncing' when
scaling an image direclty with a transform.
This patch incorporates the context's CTM (which includes scale
but not zoom) into the resampling calculation. Because the
ImageQualityController runs on a 500ms timer, a manual test
has been added.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Not removed:
https://github.com/WebKit/WebKit/blob/786e7036ff95fecccbd5ec1aae8a39a523227f1e/Source/WebCore/rendering/ImageQualityController.cpp#L125
to Line 127.
_____
Added these two lines (155 & 156):
https://github.com/WebKit/WebKit/blob/786e7036ff95fecccbd5ec1aae8a39a523227f1e/Source/WebCore/rendering/ImageQualityController.cpp#L155
_____
LayoutSize not detailed and also not updated below:
https://github.com/WebKit/WebKit/blob/786e7036ff95fecccbd5ec1aae8a39a523227f1e/Source/WebCore/rendering/ImageQualityController.cpp#L172
_______
Above are some examples, which indicates that it might be added in some shape or form but not completely.. Appreciate if someone can confirm. Thanks!
Ahmad Saleem
I tried it with following:
https://github.com/WebKit/WebKit/pull/5111
but it seems that this optimisation was removed in follow-up:
https://src.chromium.org/viewvc/blink?revision=194338&view=revision
I am going to close by PR despite review from Said because it is leading to build failures as well. Thanks!