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


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

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


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

示例1:

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

示例2: INHERITED

SkComposeShader::SkComposeShader(SkFlattenableReadBuffer& buffer) :
    INHERITED(buffer) {
    fShaderA = static_cast<SkShader*>(buffer.readFlattenable());
    if (NULL == fShaderA) {
        fShaderA = SkNEW_ARGS(SkColorShader, (0));
    }
    fShaderB = static_cast<SkShader*>(buffer.readFlattenable());
    if (NULL == fShaderB) {
        fShaderB = SkNEW_ARGS(SkColorShader, (0));
    }
    fMode = static_cast<SkXfermode*>(buffer.readFlattenable());
}
开发者ID:0omega,项目名称:platform_external_skia,代码行数:12,代码来源:SkComposeShader.cpp

示例3: paint_read

static void paint_read(SkPaint* paint, SkFlattenableReadBuffer& buffer)
{
    paint->setAntiAlias(buffer.readBool());
    paint->setStyle((SkPaint::Style)buffer.readU8());
    paint->setAlpha(buffer.readU8());
    
    if (paint->getStyle() != SkPaint::kFill_Style)
    {
        paint->setStrokeWidth(buffer.readScalar());
        paint->setStrokeMiter(buffer.readScalar());
        paint->setStrokeCap((SkPaint::Cap)buffer.readU8());
        paint->setStrokeJoin((SkPaint::Join)buffer.readU8());
    }

    paint->setMaskFilter((SkMaskFilter*)buffer.readFlattenable())->safeUnref();
    paint->setPathEffect((SkPathEffect*)buffer.readFlattenable())->safeUnref();
    paint->setRasterizer((SkRasterizer*)buffer.readFlattenable())->safeUnref();
    paint->setXfermode((SkXfermode*)buffer.readFlattenable())->safeUnref();
}
开发者ID:Dieken,项目名称:SurfaceFlinger,代码行数:19,代码来源:SkLayerRasterizer.cpp

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

示例5: INHERITED

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

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

    if (fModes) {
        SkASSERT(storedCount < 0);
        buffer.read(fModes, fCount * sizeof(fModes[0]));
    } else {
        SkASSERT(storedCount >= 0);
    }
}
开发者ID:0omega,项目名称:platform_external_skia,代码行数:15,代码来源:SkTestImageFilters.cpp

示例6: INHERITED

SkGroupShape::SkGroupShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer){
    int count = buffer.readS32();
    for (int i = 0; i < count; i++) {
        SkShape* shape = reinterpret_cast<SkShape*>(buffer.readFlattenable());
        SkMatrixRef* mr = NULL;
        uint32_t size = buffer.readS32();
        if (size) {
            char storage[SkMatrix::kMaxFlattenSize];
            buffer.read(storage, SkAlign4(size));
            mr = SkNEW(SkMatrixRef);
            mr->unflatten(storage);
        }
        if (shape) {
            this->appendShape(shape, mr)->unref();
        }
        SkSafeUnref(mr);
    }
}
开发者ID:Beifeng,项目名称:WTL-DUI,代码行数:18,代码来源:SkGroupShape.cpp

示例7: INHERITED

SkFilterShader::SkFilterShader(SkFlattenableReadBuffer& buffer) :
        INHERITED(buffer) {
    fShader = static_cast<SkShader*>(buffer.readFlattenable());
    fFilter = static_cast<SkColorFilter*>(buffer.readFlattenable());
}
开发者ID:0omega,项目名称:platform_external_skia,代码行数:5,代码来源:SkColorFilter.cpp

示例8: INHERITED

SkDataPixelRef::SkDataPixelRef(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer, NULL) {
    fData = (SkData*)buffer.readFlattenable();
    this->setPreLocked(const_cast<void*>(fData->data()), NULL);
}
开发者ID:ConradIrwin,项目名称:gecko-dev,代码行数:5,代码来源:SkDataPixelRef.cpp


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