[Webkit-unassigned] [Bug 184356] Tighten ImageSource to have BitmapImage pointer instead of Image

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> changed:

           What    |Removed                     |Added
                 CC|                            |sabouhallawa at apple.com
 Attachment #337360|review?                     |review+
              Flags|                            |

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

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 { }; }

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180406/1e67ed3a/attachment-0002.html>

More information about the webkit-unassigned mailing list