Bug 202572 - Implement OffscreenCanvas.transferToImageBitmap
Summary: Implement OffscreenCanvas.transferToImageBitmap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Lord
URL:
Keywords: InRadar
Depends on: 183440
Blocks: 183720 202573
  Show dependency treegraph
 
Reported: 2019-10-04 01:40 PDT by Chris Lord
Modified: 2019-12-04 09:17 PST (History)
18 users (show)

See Also:


Attachments
Patch (17.50 KB, patch)
2019-10-10 03:45 PDT, Chris Lord
no flags Details | Formatted Diff | Diff
Patch (17.11 KB, patch)
2019-12-03 03:51 PST, Chris Lord
no flags Details | Formatted Diff | Diff
Patch (17.41 KB, patch)
2019-12-04 03:08 PST, Chris Lord
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Chris Lord 2019-10-10 03:45:34 PDT
Created attachment 380627 [details]
Patch
Comment 2 Chris Lord 2019-12-03 03:51:41 PST
Created attachment 384704 [details]
Patch
Comment 3 Antti Koivisto 2019-12-03 06:36:53 PST
Comment on attachment 384704 [details]
Patch

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

> Source/WebCore/html/OffscreenCanvas.cpp:195
> +    m_hasCreatedImageBuffer = true;

Shouldn't this be set only after the nullptr return path?

> Source/WebCore/html/OffscreenCanvas.cpp:197
> +    if (!width() || !height())

size().isEmpty()?
Comment 4 Chris Lord 2019-12-04 03:08:23 PST
Created attachment 384801 [details]
Patch
Comment 5 WebKit Commit Bot 2019-12-04 03:54:06 PST
Comment on attachment 384801 [details]
Patch

Clearing flags on attachment: 384801

Committed r253099: <https://trac.webkit.org/changeset/253099>
Comment 6 WebKit Commit Bot 2019-12-04 03:54:08 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-12-04 03:55:24 PST
<rdar://problem/57620574>
Comment 8 Darin Adler 2019-12-04 09:17:59 PST
Comment on attachment 384801 [details]
Patch

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

> Source/WebCore/html/CanvasBase.h:113
> +    std::unique_ptr<ImageBuffer> setImageBuffer(std::unique_ptr<ImageBuffer>&&) const;

C++ calls this operation "exchange" as in "std::exchange", rather than "set". I think we might want to name this function accordingly.