Bug 232528 - Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBuffer::logicalSize()
Summary: Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to Ima...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 225377
  Show dependency treegraph
 
Reported: 2021-10-30 02:00 PDT by Myles C. Maxfield
Modified: 2021-10-30 20:22 PDT (History)
15 users (show)

See Also:


Attachments
Patch (12.46 KB, patch)
2021-10-30 02:04 PDT, Myles C. Maxfield
thorton: review+
Details | Formatted Diff | Diff
Patch for committing (13.03 KB, patch)
2021-10-30 19:46 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].