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


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

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


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

示例1: INHERITED

SkDashPathEffect::SkDashPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    fInitialDashIndex = buffer.readInt();
    fInitialDashLength = buffer.readScalar();
    fIntervalLength = buffer.readScalar();
    fScaleToFit = buffer.readBool();

    fCount = buffer.getArrayCount();
    fIntervals = (SkScalar*)sk_malloc_throw(sizeof(SkScalar) * fCount);
    buffer.readScalarArray(fIntervals);
}
开发者ID:killvxk,项目名称:KUI,代码行数:10,代码来源:SkDashPathEffect.cpp

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

示例3: INHERITED

SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    fKernelSize.fWidth = buffer.readInt();
    fKernelSize.fHeight = buffer.readInt();
    uint32_t size = fKernelSize.fWidth * fKernelSize.fHeight;
    fKernel = SkNEW_ARRAY(SkScalar, size);
    SkDEBUGCODE(uint32_t readSize = )buffer.readScalarArray(fKernel);
    SkASSERT(readSize == size);
    fGain = buffer.readScalar();
    fBias = buffer.readScalar();
    fTarget.fX = buffer.readInt();
    fTarget.fY = buffer.readInt();
    fTileMode = (TileMode) buffer.readInt();
    fConvolveAlpha = buffer.readBool();
}
开发者ID:JoKaWare,项目名称:GViews,代码行数:14,代码来源:SkMatrixConvolutionImageFilter.cpp

示例4: INHERITED

SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer)
    : INHERITED(1, buffer) {
    // We need to be able to read at most SK_MaxS32 bytes, so divide that
    // by the size of a scalar to know how many scalars we can read.
    static const int32_t kMaxSize = SK_MaxS32 / sizeof(SkScalar);
    fKernelSize.fWidth = buffer.readInt();
    fKernelSize.fHeight = buffer.readInt();
    if ((fKernelSize.fWidth >= 1) && (fKernelSize.fHeight >= 1) &&
        // Make sure size won't be larger than a signed int,
        // which would still be extremely large for a kernel,
        // but we don't impose a hard limit for kernel size
        (kMaxSize / fKernelSize.fWidth >= fKernelSize.fHeight)) {
        size_t size = fKernelSize.fWidth * fKernelSize.fHeight;
        fKernel = SkNEW_ARRAY(SkScalar, size);
        SkDEBUGCODE(bool success =) buffer.readScalarArray(fKernel, size);
        SkASSERT(success);
    } else {
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:17,代码来源:SkMatrixConvolutionImageFilter.cpp

示例5: INHERITED

SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    SkDEBUGCODE(uint32_t readSize =) buffer.readScalarArray(fCoefficients);
    SkASSERT(readSize == 16);
    fScale.fWidth = buffer.readScalar();
    fScale.fHeight = buffer.readScalar();
}
开发者ID:windyuuy,项目名称:opera,代码行数:6,代码来源:SkBicubicImageFilter.cpp


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