Bug 223203 - Change canvasChanged() to take a Optional<FloatRect>
Summary: Change canvasChanged() to take a Optional<FloatRect>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks: 223056
  Show dependency treegraph
 
Reported: 2021-03-15 11:40 PDT by Simon Fraser (smfr)
Modified: 2021-03-15 13:50 PDT (History)
21 users (show)

See Also:


Attachments
Patch (15.29 KB, patch)
2021-03-15 11:45 PDT, Simon Fraser (smfr)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (16.52 KB, patch)
2021-03-15 12:14 PDT, Simon Fraser (smfr)
sabouhallawa: review+
Details | Formatted Diff | Diff

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