src/blinkit/blink/renderer/core/layout/compositing/CompositedLayerMapping.cpp
bool CompositedLayerMapping::isDirectlyCompositedImage() const
{
    ASSERT(layoutObject()->isImage());
    LayoutImage* imageLayoutObject = toLayoutImage(layoutObject());

    if (m_owningLayer.hasBoxDecorationsOrBackground()
        || imageLayoutObject->hasClip()
        || imageLayoutObject->hasClipPath()
        || imageLayoutObject->hasObjectFit())
        return false;

    if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) {
        if (!cachedImage->hasImage())
            return false;

        Image* image = cachedImage->image();
        if (!image->isBitmapImage())
            return false;

        return true;
    }

    return false;
}
// An image can be directly composited if it's the sole content of the layer,
// and has no box decorations or clipping that require painting. Direct
// compositing saves a backing store.
An image can be directly composited if it's the sole content of the layer,
and has no box decorations or clipping that require painting. Direct
compositing saves a backing store.
An image can be directly composited if it ' s the sole content of the layer and has no box decorations or clipping that require painting . Direct compositing saves a backing store .
bool CompositedLayerMapping::isDirectlyCompositedImage() const
{
    ASSERT(layoutObject()->isImage());
    LayoutImage* imageLayoutObject = toLayoutImage(layoutObject());
    if (m_owningLayer.hasBoxDecorationsOrBackground()
        || imageLayoutObject->hasClip()
        || imageLayoutObject->hasClipPath()
        || imageLayoutObject->hasObjectFit())
        return false;
    if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) {
        if (!cachedImage->hasImage())
            return false;
        Image* image = cachedImage->image();
        if (!image->isBitmapImage())
            return false;
        return true;
    }
    return false;
}
bool CompositedLayerMapping :: isDirectlyCompositedImage ( ) const { ASSERT ( layoutObject ( ) -> isImage ( ) ) ; LayoutImage * imageLayoutObject = toLayoutImage ( layoutObject ( ) ) ; if ( m_owningLayer . hasBoxDecorationsOrBackground ( ) || imageLayoutObject -> hasClip ( ) || imageLayoutObject -> hasClipPath ( ) || imageLayoutObject -> hasObjectFit ( ) ) return false ; if ( ImageResource * cachedImage = imageLayoutObject -> cachedImage ( ) ) { if ( ! cachedImage -> hasImage ( ) ) return false ; Image * image = cachedImage -> image ( ) ; if ( ! image -> isBitmapImage ( ) ) return false ; return true ; } return false ; }
An image can be directly composited if it's the sole content of the layer,
and has no box decorations or clipping that require painting.
An image can be directly composited if it ' s the sole content of the layer and has no box decorations or clipping that require painting .