Bug 223203

Summary: Change canvasChanged() to take a Optional<FloatRect>
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CanvasAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, dino, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hi, hta, jer.noble, joepeck, kangil.han, macpherson, menard, philipj, sabouhallawa, sergio, simon.fraser, tommyw, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 223056    
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch sabouhallawa: review+

Description Simon Fraser (smfr) 2021-03-15 11:40:33 PDT
Change canvasChanged() to take a Optional<FloatRect>
Comment 1 Simon Fraser (smfr) 2021-03-15 11:45:57 PDT
Created attachment 423212 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-03-15 12:14:57 PDT
Created attachment 423216 [details]
Patch
Comment 3 Said Abou-Hallawa 2021-03-15 12:31:59 PDT
Comment on attachment 423216 [details]
Patch

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

> Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h:322
> +    FloatRect backingStoreBounds() const { return FloatRect { { }, FloatSize { canvasBase().size() } }; }

I think you can omit FloatRect and FloatSize.
Comment 4 Chris Dumez 2021-03-15 12:49:13 PDT
Comment on attachment 423216 [details]
Patch

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

> Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:152
> +void CanvasCaptureMediaStreamTrack::Source::canvasChanged(CanvasBase& canvas, Optional<FloatRect>)

Why are we no longer passing is as a const ref? If anything, the object is larger now...
Comment 5 Simon Fraser (smfr) 2021-03-15 13:49:38 PDT
Changed to const Optional<FloatRect>&
https://trac.webkit.org/changeset/274436/webkit
Comment 6 Radar WebKit Bug Importer 2021-03-15 13:50:16 PDT
<rdar://problem/75445274>