[webkit-reviews] review granted: [Bug 217339] [GPU Process] Support CanvasRenderingContext2D.drawImage() with HTMLVideoElement : [Attachment 410690] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 7 09:08:16 PDT 2020

Darin Adler <darin at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 217339: [GPU Process] Support CanvasRenderingContext2D.drawImage() with

Attachment 410690: Patch


--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 410690
  --> https://bugs.webkit.org/attachment.cgi?id=410690

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

> Source/WebCore/platform/graphics/GraphicsContext.cpp:1263
> +    player.setVisible(true);

Surprised that this:

1) is needed.
2) is needed every time.
3) is harmless from a side effect point of view

> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1937
> +void GraphicsContext::paintFrameForMedia(MediaPlayer& player, const
FloatRect& destination)

Annoying that this repeats the code from the non-CG version. Is there a better
way to factor this?

> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1947
> +    player.setVisible(true);


> Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:1242
> +    // Should be handled by the delegate.

Ugly but OK.

> Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:2589
> +    static Ref<PaintFrameForMedia> create(MediaPlayer& player, const
FloatRect& destination)

Should not inline this kind of function. The constructor can get inclined
instead. Better for efficiency and for class definition brevity.

> Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:2603
> +    static Ref<PaintFrameForMedia> create(MediaPlayerIdentifier identifier,
const FloatRect& destination)


More information about the webkit-reviews mailing list