Bug 232528

Summary: Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBuffer::logicalSize()
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, heycam, kondapallykalyan, pdr, sabouhallawa, schenney, sergio, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 225377    
Attachments:
Description Flags
Patch
thorton: review+
Patch for committing none

Description Myles C. Maxfield 2021-10-30 02:00:58 PDT
Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBUffer::logicalSize()
Comment 1 Myles C. Maxfield 2021-10-30 02:04:00 PDT
Created attachment 442907 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-10-30 02:04:41 PDT
<rdar://problem/84836309>
Comment 3 Cameron McCormack (:heycam) 2021-10-30 14:40:54 PDT
Comment on attachment 442907 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBUffer::logicalSize()

"ImageBuffer::logicalSize()"

> Source/WebCore/ChangeLog:10
> +        These are the callers which seem obviously correct to migrate from truncatedLogicalSize() to logicalSize(),
> +        because these are the callers that immediately cast the result to FloatSize. That means, before this patch,
> +        these callers are going from float -> int -> float.

Can you describe in here why we are making this change? I gather it's something like "truncatedLogicalSize() never makes sense, because of XX reasons".

And maybe reference bug 225377, like you did in the bug 232515 ChangeLog.

> Source/WebKit/ChangeLog:3
> +        Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBUffer::logicalSize()

"ImageBuffer::logicalSize()"

> Source/WebCore/platform/graphics/filters/FEBlend.cpp:73
> +    filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->truncatedLogicalSize() }, { CompositeOperator::SourceOver, m_mode });

This is constructing a FloatRect directly now. Did you mean to change this to logicalSize()?
Comment 4 Myles C. Maxfield 2021-10-30 14:50:50 PDT
Comment on attachment 442907 [details]
Patch

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

>> Source/WebCore/platform/graphics/filters/FEBlend.cpp:73
>> +    filterContext.drawImageBuffer(*imageBuffer, drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->truncatedLogicalSize() }, { CompositeOperator::SourceOver, m_mode });
> 
> This is constructing a FloatRect directly now. Did you mean to change this to logicalSize()?

Yep. Will fix.
Comment 5 Myles C. Maxfield 2021-10-30 19:46:25 PDT
Created attachment 442924 [details]
Patch for committing
Comment 6 EWS 2021-10-30 20:22:53 PDT
Committed r285090 (243732@main): <https://commits.webkit.org/243732@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442924 [details].