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


C++ SkFlattenableReadBuffer::readByteArray方法代码示例

本文整理汇总了C++中SkFlattenableReadBuffer::readByteArray方法的典型用法代码示例。如果您正苦于以下问题:C++ SkFlattenableReadBuffer::readByteArray方法的具体用法?C++ SkFlattenableReadBuffer::readByteArray怎么用?C++ SkFlattenableReadBuffer::readByteArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SkFlattenableReadBuffer的用法示例。


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

示例1: INHERITED

SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    bool hasModes = buffer.readBool();
    if (hasModes) {
        this->initAllocModes();
        SkASSERT(buffer.getArrayCount() == countInputs() * sizeof(fModes[0]));
        buffer.readByteArray(fModes);
    } else {
        fModes = 0;
    }
}
开发者ID:ConradIrwin,项目名称:gecko-dev,代码行数:10,代码来源:SkMergeImageFilter.cpp

示例2: INHERITED

SkImageRef::SkImageRef(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer, &gImageRefMutex), fErrorInDecoding(false) {
    fConfig = (SkBitmap::Config)buffer.readUInt();
    fSampleSize = buffer.readInt();
    fDoDither = buffer.readBool();

    size_t length = buffer.getArrayCount();
    fStream = SkNEW_ARGS(SkMemoryStream, (length));
    buffer.readByteArray((void*)fStream->getMemoryBase());

    fPrev = fNext = NULL;
    fFactory = NULL;
}
开发者ID:Cue,项目名称:skia,代码行数:13,代码来源:SkImageRef.cpp

示例3: INHERITED

SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer, NULL) {
    fSize = buffer.getArrayCount();
    fStorage = sk_malloc_throw(fSize);
    buffer.readByteArray(fStorage);
    if (buffer.readBool()) {
        fCTable = buffer.readFlattenableT<SkColorTable>();
    } else {
        fCTable = NULL;
    }
    fOwnPixels = true;

    this->setPreLocked(fStorage, fCTable);
}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:14,代码来源:SkMallocPixelRef.cpp

示例4: INHERITED

SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    int storedCount = buffer.readInt();
    this->initAlloc(SkAbs32(storedCount), storedCount < 0);

    for (int i = 0; i < fCount; ++i) {
        fFilters[i] = buffer.readFlattenableT<SkImageFilter>();
    }

    if (fModes) {
        SkASSERT(storedCount < 0);
        SkASSERT(buffer.getArrayCount() == fCount * sizeof(fModes[0]));
        buffer.readByteArray(fModes);
    } else {
        SkASSERT(storedCount >= 0);
    }
}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:16,代码来源:SkTestImageFilters.cpp

示例5: INHERITED

SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
    : INHERITED(buffer, NULL)
    , fOwnPixels(true)
{
    fRB = buffer.read32();
    size_t size = buffer.isValid() ? this->info().getSafeSize(fRB) : 0;
    fStorage = sk_malloc_throw(size);
    buffer.readByteArray(fStorage, size);
    if (buffer.readBool()) {
        fCTable = SkNEW_ARGS(SkColorTable, (buffer));
    } else {
        fCTable = NULL;
    }

    this->setPreLocked(fStorage, fCTable);
}
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:16,代码来源:SkMallocPixelRef.cpp

示例6: SkMaskFilter

SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer)
    : SkMaskFilter(buffer) {
    SkASSERT(buffer.getArrayCount() == sizeof(Light));
    buffer.readByteArray(&fLight);
    SkASSERT(fLight.fPad == 0); // for the font-cache lookup to be clean
    fBlurSigma = buffer.readScalar();
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
    // Fixing this must be done in two stages. When the skps are recaptured in V13,
    // remove the ConvertRadiusToSigma but retain the absolute value.
    // At the same time, switch the code in flatten to write a positive value.
    // When the skps are captured in V14 the absolute value can be removed.
    if (fBlurSigma > 0) {
        fBlurSigma = SkBlurMask::ConvertRadiusToSigma(fBlurSigma);
    } else {
        fBlurSigma = -fBlurSigma;
    }
#endif
}
开发者ID:shuowen,项目名称:kalpa,代码行数:18,代码来源:SkEmbossMaskFilter.cpp

示例7: INHERITED

SkTableMaskFilter::SkTableMaskFilter(SkFlattenableReadBuffer& rb)
        : INHERITED(rb) {
    SkASSERT(256 == rb.getArrayCount());
    rb.readByteArray(fTable);
}
开发者ID:Cue,项目名称:skia,代码行数:5,代码来源:SkTableMaskFilter.cpp


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