Bug 170353 - REGRESSION(r214635): Calculate image subsampling only for CG
Summary: REGRESSION(r214635): Calculate image subsampling only for CG
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-31 12:04 PDT by Said Abou-Hallawa
Modified: 2017-04-09 11:45 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.75 KB, patch)
2017-03-31 12:24 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (11.76 KB, patch)
2017-03-31 12:37 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (12.14 KB, patch)
2017-03-31 16:05 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (12.88 KB, patch)
2017-04-09 11:05 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2017-03-31 12:04:13 PDT
In the <http://trac.webkit.org/changeset/214635>, we needed to calculate the image scaling factor for all platforms. It was needed do the calculation: sizeForDrawing = sizeOfImage * imageScaleFactor. But this makes ImageSource::subsamplingLevelForScale() now returns a SubsamplingLevel not equal to SubsamplingLevel::Default if the scaleFactor is greater than { 1, 1} for all platforms. The subsamplingLevel should only be used for CG.
Comment 1 Said Abou-Hallawa 2017-03-31 12:24:03 PDT
Created attachment 305997 [details]
Patch
Comment 2 Said Abou-Hallawa 2017-03-31 12:37:34 PDT
Created attachment 306002 [details]
Patch
Comment 3 Simon Fraser (smfr) 2017-03-31 13:11:26 PDT
Comment on attachment 306002 [details]
Patch

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

> Source/WebCore/platform/graphics/GraphicsContext.h:502
> +    FloatSize scaleFactor(const FloatRect& destRect, const FloatRect& srcRect) const;

This needs a better name that explains why two rects are passed in.
Comment 4 Said Abou-Hallawa 2017-03-31 16:05:17 PDT
Created attachment 306022 [details]
Patch
Comment 5 Said Abou-Hallawa 2017-03-31 18:06:44 PDT
Comment on attachment 306002 [details]
Patch

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

>> Source/WebCore/platform/graphics/GraphicsContext.h:502
>> +    FloatSize scaleFactor(const FloatRect& destRect, const FloatRect& srcRect) const;
> 
> This needs a better name that explains why two rects are passed in.

I renamed it to scaleFactorForDrawing().
Comment 6 Said Abou-Hallawa 2017-04-09 11:05:45 PDT
Created attachment 306627 [details]
Patch
Comment 7 WebKit Commit Bot 2017-04-09 11:45:09 PDT
Comment on attachment 306627 [details]
Patch

Clearing flags on attachment: 306627

Committed r215163: <http://trac.webkit.org/changeset/215163>
Comment 8 WebKit Commit Bot 2017-04-09 11:45:10 PDT
All reviewed patches have been landed.  Closing bug.