[webkit-reviews] review granted: [Bug 184356] Tighten ImageSource to have BitmapImage pointer instead of Image : [Attachment 337360] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 6 07:26:21 PDT 2018


Said Abou-Hallawa <sabouhallawa at apple.com> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 184356: Tighten ImageSource to have BitmapImage pointer instead of Image
https://bugs.webkit.org/show_bug.cgi?id=184356

Attachment 337360: patch

https://bugs.webkit.org/attachment.cgi?id=337360&action=review




--- Comment #4 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
Comment on attachment 337360
  --> https://bugs.webkit.org/attachment.cgi?id=337360
patch

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

> Source/WebCore/loader/ImageLoader.cpp:422
> -    if (!image->isBitmapImage()) {
> +    if (!is<BitmapImage>(image)) {

There are places of the code which use isBitmapImage() and others use
is<BitmapImage>(). I do not know the rule here and I don't know which way is
more preferable. But I think we should be consistent and use one way or the
other all over the code.

> Source/WebCore/platform/graphics/BitmapImage.h:142
> +    void decode(WTF::Function<void()>&&);

I think we can remove WTF:: here.

> Source/WebCore/platform/graphics/Image.h:-142
> -    virtual void decode(WTF::Function<void()>&&) { }
> -    virtual void imageFrameAvailableAtIndex(size_t) { }
> -

Shouldn't we do the same thing for the other methods which are related to
multi-frame images only?

    virtual NativeImagePtr nativeImageForCurrentFrame(const GraphicsContext* =
nullptr) { return nullptr; }
    virtual ImageOrientation orientationForCurrentFrame() const { return
ImageOrientation(); }
    virtual Vector<NativeImagePtr> framesNativeImages() { return { }; }


More information about the webkit-reviews mailing list