当前位置: 首页>>代码示例>>C++>>正文


C++ setEncodedSize函数代码示例

本文整理汇总了C++中setEncodedSize函数的典型用法代码示例。如果您正苦于以下问题:C++ setEncodedSize函数的具体用法?C++ setEncodedSize怎么用?C++ setEncodedSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setEncodedSize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: destroyDecodedData

void CachedImage::clear()
{
    destroyDecodedData();
    clearImage();
    m_pendingContainerSizeRequests.clear();
    setEncodedSize(0);
}
开发者ID:rhythmkay,项目名称:webkit,代码行数:7,代码来源:CachedImage.cpp

示例2: createImage

void CachedImage::addIncrementalDataBuffer(SharedBuffer& data)
{
    m_data = &data;

    createImage();

    // Have the image update its data from its internal buffer.
    // It will not do anything now, but will delay decoding until
    // queried for info (like size or specific image frames).
    bool sizeAvailable = m_image->setData(&data, false);
    if (!sizeAvailable)
        return;

    if (m_image->isNull()) {
        // Image decoding failed. Either we need more image data or the image data is malformed.
        error(errorOccurred() ? status() : DecodeError);
        if (inCache())
            MemoryCache::singleton().remove(*this);
        return;
    }

    // Tell our observers to try to draw.
    // Each chunk from the network causes observers to repaint, which will force that chunk to decode.
    // It would be nice to only redraw the decoded band of the image, but with the current design
    // (decoding delayed until painting) that seems hard.
    notifyObservers();

    setEncodedSize(m_image->data() ? m_image->data()->size() : 0);
}
开发者ID:rhythmkay,项目名称:webkit,代码行数:29,代码来源:CachedImage.cpp

示例3: setEncodedSize

void CachedRawResource::clear()
{
    m_data = nullptr;
    setEncodedSize(0);
    if (m_loader)
        m_loader->clearResourceData();
}
开发者ID:rodrigo-speller,项目名称:webkit,代码行数:7,代码来源:CachedRawResource.cpp

示例4: prune

void ImageResource::clear()
{
    prune();
    clearImage();
    m_pendingContainerSizeRequests.clear();
    setEncodedSize(0);
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:7,代码来源:ImageResource.cpp

示例5: ASSERT

void Resource::setResourceBuffer(PassRefPtr<SharedBuffer> resourceBuffer)
{
    ASSERT(m_revalidatingRequest.isNull());
    ASSERT(!errorOccurred());
    ASSERT(m_options.dataBufferingPolicy == BufferData);
    m_data = resourceBuffer;
    setEncodedSize(m_data->size());
}
开发者ID:golden628,项目名称:ChromiumGStreamerBackend,代码行数:8,代码来源:Resource.cpp

示例6: setEncodedSize

void CachedXSLStyleSheet::finishLoading(SharedBuffer* data)
{
    m_data = data;
    setEncodedSize(data ? data->size() : 0);
    if (data)
        m_sheet = m_decoder->decodeAndFlush(data->data(), encodedSize());
    setLoading(false);
    checkNotify();
}
开发者ID:clbr,项目名称:webkitfltk,代码行数:9,代码来源:CachedXSLStyleSheet.cpp

示例7: setEncodedSize

void CachedXSLStyleSheet::data(Vector<char>& data, bool allDataReceived)
{
    if (!allDataReceived)
        return;

    setEncodedSize(data.size());
    m_sheet = String(m_decoder->decode(data.data(), encodedSize()));
    m_loading = false;
    checkNotify();
}
开发者ID:oroisec,项目名称:ios,代码行数:10,代码来源:CachedXSLStyleSheet.cpp

示例8: ASSERT

void CachedTextTrack::updateData(SharedBuffer* data)
{
    ASSERT(dataBufferingPolicy() == BufferData);
    m_data = data;
    setEncodedSize(data ? data->size() : 0);

    CachedResourceClientWalker<CachedResourceClient> walker(m_clients);
    while (CachedResourceClient* client = walker.next())
        client->deprecatedDidReceiveCachedResource(this);
}
开发者ID:clbr,项目名称:webkitfltk,代码行数:10,代码来源:CachedTextTrack.cpp

示例9: setEncodedSize

void CachedResource::appendData(const char* data, int length)
{
    if (m_options.dataBufferingPolicy == DoNotBufferData)
        return;
    if (m_data)
        m_data->append(data, length);
    else
        m_data = SharedBuffer::create(data, length);
    setEncodedSize(m_data->size());
}
开发者ID:Channely,项目名称:know-your-chrome,代码行数:10,代码来源:CachedResource.cpp

示例10: setEncodedSize

void CachedFont::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
{
    if (!allDataReceived)
        return;

    m_data = data;     
    setEncodedSize(m_data.get() ? m_data->size() : 0);
    m_loading = false;
    checkNotify();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:10,代码来源:CachedFont.cpp

示例11: setEncodedSize

void CachedScript::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
{
    if (!allDataReceived)
        return;

    m_data = data;
    setEncodedSize(m_data.get() ? m_data->size() : 0);
    if (m_data.get())
        m_script = m_encoding.decode(m_data->data(), encodedSize());
    m_loading = false;
    checkNotify();
}
开发者ID:FilipBE,项目名称:qtextended,代码行数:12,代码来源:CachedScript.cpp

示例12: TRACE_EVENT0

void Resource::appendData(const char* data, size_t length)
{
    TRACE_EVENT0("blink", "Resource::appendData");
    ASSERT(m_revalidatingRequest.isNull());
    ASSERT(!errorOccurred());
    if (m_options.dataBufferingPolicy == DoNotBufferData)
        return;
    if (m_data)
        m_data->append(data, length);
    else
        m_data = SharedBuffer::createPurgeable(data, length);
    setEncodedSize(m_data->size());
}
开发者ID:golden628,项目名称:ChromiumGStreamerBackend,代码行数:13,代码来源:Resource.cpp

示例13: setEncodedSize

void CachedXSLStyleSheet::data(PassRefPtr<ResourceBuffer> data, bool allDataReceived)
{
    if (!allDataReceived)
        return;

    m_data = data;     
    setEncodedSize(m_data.get() ? m_data->size() : 0);
    if (m_data.get()) {
        m_sheet = m_decoder->decode(m_data->data(), encodedSize());
        m_sheet.append(m_decoder->flush());
    }
    setLoading(false);
    checkNotify();
}
开发者ID:166MMX,项目名称:openjdk.java.net-openjfx-8u40-rt,代码行数:14,代码来源:CachedXSLStyleSheet.cpp

示例14: setEncodedSize

void CachedXSLStyleSheet::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
{
    if (!allDataReceived)
        return;

    m_data = data;     
    setEncodedSize(m_data.get() ? m_data->size() : 0);
    if (m_data.get()) {
        m_sheet = String(m_decoder->decode(m_data->data(), encodedSize()));
        m_sheet += m_decoder->flush();
    }
    m_loading = false;
    checkNotify();
}
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:14,代码来源:CachedXSLStyleSheet.cpp

示例15: setEncodedSize

void CachedCSSStyleSheet::finishLoading(ResourceBuffer* data)
{
    m_data = data;
    setEncodedSize(m_data.get() ? m_data->size() : 0);
    // Decode the data to find out the encoding and keep the sheet text around during checkNotify()
    if (m_data) {
        m_decodedSheetText = m_decoder->decode(m_data->data(), m_data->size());
        m_decodedSheetText.append(m_decoder->flush());
    }
    setLoading(false);
    checkNotify();
    // Clear the decoded text as it is unlikely to be needed immediately again and is cheap to regenerate.
    m_decodedSheetText = String();
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:14,代码来源:CachedCSSStyleSheet.cpp


注:本文中的setEncodedSize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。