Ejemplo n.º 1
0
ClipRecorder::~ClipRecorder()
{
    DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_type);
    if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
        ASSERT(m_context.displayItemList());
        m_context.displayItemList()->add(EndClipDisplayItem::create(m_client, endType));
    } else {
        EndClipDisplayItem endClipDisplayItem(m_client, endType);
        endClipDisplayItem.replay(m_context);
    }
}
RoundedInnerRectClipper::~RoundedInnerRectClipper()
{
    DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_clipType);
    if (m_useDisplayItemList) {
        ASSERT(m_paintInfo.context->displayItemList());
        if (!m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled()) {
            if (m_paintInfo.context->displayItemList()->lastDisplayItemIsNoopBegin())
                m_paintInfo.context->displayItemList()->removeLastDisplayItem();
            else
                m_paintInfo.context->displayItemList()->createAndAppend<EndClipDisplayItem>(m_layoutObject, endType);
        }
    } else {
        EndClipDisplayItem endClipDisplayItem(m_layoutObject, endType);
        endClipDisplayItem.replay(*m_paintInfo.context);
    }
}
FloatClipRecorder::~FloatClipRecorder()
{
    DisplayItem::Type endType = DisplayItem::floatClipTypeToEndFloatClipType(m_clipType);
    if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
        ASSERT(m_context.displayItemList());
        if (!m_context.displayItemList()->displayItemConstructionIsDisabled()) {
            if (m_context.displayItemList()->lastDisplayItemIsNoopBegin())
                m_context.displayItemList()->removeLastDisplayItem();
            else
                m_context.displayItemList()->createAndAppend<EndFloatClipDisplayItem>(m_client, endType);
        }
    } else {
        EndFloatClipDisplayItem endClipDisplayItem(m_client, endType);
        endClipDisplayItem.replay(m_context);
    }
}