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


C++ SkFlattenableReadBuffer类代码示例

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


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

示例1: INHERITED

SkMorphologyImageFilter::SkMorphologyImageFilter(SkFlattenableReadBuffer& buffer)
  : INHERITED(1, buffer) {
    fRadius.fWidth = buffer.readInt();
    fRadius.fHeight = buffer.readInt();
    buffer.validate((fRadius.fWidth >= 0) &&
                    (fRadius.fHeight >= 0));
}
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:7,代码来源:SkMorphologyImageFilter.cpp

示例2: INHERITED

SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
    fInheritColor = b.readU8(); 
    if (fInheritColor) {
        return;
    }
    fColor = b.readU32();
}
开发者ID:Dieken,项目名称:SurfaceFlinger,代码行数:7,代码来源:SkShader.cpp

示例3: INHERITED

SkBitmapProcShader::SkBitmapProcShader(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer) {
    buffer.readBitmap(&fRawBitmap);
    fState.fTileModeX = buffer.readUInt();
    fState.fTileModeY = buffer.readUInt();
    fFlags = 0; // computed in setContext
}
开发者ID:bunhere,项目名称:skia,代码行数:7,代码来源:SkBitmapProcShader.cpp

示例4: INHERITED

SkLayerDrawLooper::SkLayerDrawLooper(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer),
          fRecs(NULL),
          fCount(0),
          fCurrRec(NULL) {
    int count = buffer.readInt();

    for (int i = 0; i < count; i++) {
        LayerInfo info;
        info.fPaintBits = buffer.readInt();
        info.fColorMode = (SkXfermode::Mode)buffer.readInt();
        info.fOffset.fX = buffer.readScalar();
        info.fOffset.fY = buffer.readScalar();
        info.fPostTranslate = buffer.readBool();
        this->addLayer(info)->unflatten(buffer);
    }
    SkASSERT(count == fCount);

    // we're in reverse order, so fix it now
    fRecs = Rec::Reverse(fRecs);
    
#ifdef SK_DEBUG
    {
        Rec* rec = fRecs;
        int n = 0;
        while (rec) {
            rec = rec->fNext;
            n += 1;
        }
        SkASSERT(count == n);
    }
#endif
}
开发者ID:ghub,项目名称:NVprSDK,代码行数:33,代码来源:SkLayerDrawLooper.cpp

示例5: INHERITED

SkDisplacementMapEffect::SkDisplacementMapEffect(SkFlattenableReadBuffer& buffer)
  : INHERITED(buffer)
{
    fXChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
    fYChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
    fScale            = buffer.readScalar();
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_skia_src,代码行数:7,代码来源:SkDisplacementMapEffect.cpp

示例6: INHERITED

SkAvoidXfermode::SkAvoidXfermode(SkFlattenableReadBuffer& buffer)
    : INHERITED(buffer)
{
    fOpColor = buffer.readU32();
    fDistMul = buffer.readU32();
    fMode = (Mode)buffer.readU8();
}
开发者ID:ACSOP,项目名称:android_external_skia,代码行数:7,代码来源:SkAvoidXfermode.cpp

示例7: INHERITED

SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
    fFlags = 0; // computed in setContext
    fInheritColor = b.readU8(); 
    if (fInheritColor) {
        return;
    }
    fColor = b.readU32();
}
开发者ID:AOSP-JF-MM,项目名称:platform_external_skia,代码行数:8,代码来源:SkShader.cpp

示例8: SkMaskFilter

SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer)
{
    fRadius = buffer.readScalar();
    fBlurStyle = (SkBlurMaskFilter::BlurStyle)buffer.readS32();
    fBlurFlags = buffer.readU32() & SkBlurMaskFilter::kAll_BlurFlag;
    SkASSERT(fRadius >= 0);
    SkASSERT((unsigned)fBlurStyle < SkBlurMaskFilter::kBlurStyleCount);
}
开发者ID:sergecodd,项目名称:FireFox-OS,代码行数:8,代码来源:SkBlurMaskFilter.cpp

示例9: INHERITED

SkFlipPixelRef::SkFlipPixelRef(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer, NULL) {
    fSize = buffer.readU32();
    fStorage = sk_malloc_throw(fSize << 1);
    fPage0 = fStorage;
    fPage1 = (char*)fStorage + fSize;
    buffer.read(fPage0, fSize);
}
开发者ID:Beifeng,项目名称:WTL-DUI,代码行数:8,代码来源:SkFlipPixelRef.cpp

示例10:

SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
{
    fDx = buffer.readScalar();
    fDy = buffer.readScalar();
    fBlurColor = buffer.readU32();
    fBlur = static_cast<SkMaskFilter*>(buffer.readFlattenable());
    fColorFilter = static_cast<SkColorFilter*>(buffer.readFlattenable());
    fBlurFlags = buffer.readU32() & kAll_BlurFlag;
}
开发者ID:achellies,项目名称:DUI_LIb,代码行数:9,代码来源:SkBlurDrawLooper.cpp

示例11: INHERITED

SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer) {

    fDx = buffer.readScalar();
    fDy = buffer.readScalar();
    fBlurColor = buffer.readColor();
    fBlur = buffer.readMaskFilter();
    fColorFilter = buffer.readColorFilter();
    fBlurFlags = buffer.readUInt() & kAll_BlurFlag;
}
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:10,代码来源:SkBlurDrawLooper.cpp

示例12: 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

示例13: INHERITED

SkPixelRef::SkPixelRef(SkFlattenableReadBuffer& buffer, SkBaseMutex* mutex)
        : INHERITED(buffer) {
    this->setMutex(mutex);
    fPixels = NULL;
    fColorTable = NULL; // we do not track ownership of this
    fLockCount = 0;
    fIsImmutable = buffer.readBool();
    fGenerationID = buffer.readUInt();
    fPreLocked = false;
}
开发者ID:caiyongjian,项目名称:kalpa,代码行数:10,代码来源:SkPixelRef.cpp

示例14: INHERITED

SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    SkDEBUGCODE(bool success =) buffer.readScalarArray(fCoefficients, 16);
    SkASSERT(success);
    fScale.fWidth = buffer.readScalar();
    fScale.fHeight = buffer.readScalar();
    buffer.validate(SkScalarIsFinite(fScale.fWidth) &&
                    SkScalarIsFinite(fScale.fHeight) &&
                    (fScale.fWidth >= 0) &&
                    (fScale.fHeight >= 0));
}
开发者ID:rzr,项目名称:Tizen_Crosswalk,代码行数:10,代码来源:SkBicubicImageFilter.cpp

示例15: fInputCount

SkImageFilter::SkImageFilter(SkFlattenableReadBuffer& buffer)
    : fInputCount(buffer.readInt()), fInputs(new SkImageFilter*[fInputCount]) {
    for (int i = 0; i < fInputCount; i++) {
        if (buffer.readBool()) {
            fInputs[i] = static_cast<SkImageFilter*>(buffer.readFlattenable());
        } else {
            fInputs[i] = NULL;
        }
    }
}
开发者ID:Frankie-666,项目名称:color-emoji.skia,代码行数:10,代码来源:SkImageFilter.cpp


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