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


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

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


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

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

示例2: INHERITED

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

    for (int i = 0; i < count; i++) {
        LayerInfo info;
        info.fFlagsMask = buffer.readInt();
        info.fPaintBits = buffer.readInt();
        info.fColorMode = (SkXfermode::Mode)buffer.readInt();
        buffer.readPoint(&info.fOffset);
        info.fPostTranslate = buffer.readBool();
        buffer.readPaint(this->addLayerOnTop(info));
    }
    SkASSERT(count == fCount);

#ifdef SK_DEBUG
    {
        Rec* rec = fRecs;
        int n = 0;
        while (rec) {
            rec = rec->fNext;
            n += 1;
        }
        SkASSERT(count == n);
    }
#endif
}
开发者ID:Frankie-666,项目名称:color-emoji.skia,代码行数:31,代码来源:SkLayerDrawLooper.cpp

示例3: CropRect

SkImageFilter::SkImageFilter(int inputCount, SkFlattenableReadBuffer& buffer) {
    fInputCount = buffer.readInt();
    if (buffer.validate((fInputCount >= 0) && ((inputCount < 0) || (fInputCount == inputCount)))) {
        fInputs = new SkImageFilter*[fInputCount];
        for (int i = 0; i < fInputCount; i++) {
            if (buffer.readBool()) {
                fInputs[i] = buffer.readImageFilter();
            } else {
                fInputs[i] = NULL;
            }
            if (!buffer.isValid()) {
                fInputCount = i; // Do not use fInputs past that point in the destructor
                break;
            }
        }
        SkRect rect;
        buffer.readRect(&rect);
        if (buffer.isValid() && buffer.validate(SkIsValidRect(rect))) {
            uint32_t flags = buffer.readUInt();
            fCropRect = CropRect(rect, flags);
        }
    } else {
        fInputCount = 0;
        fInputs = NULL;
    }
}
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:26,代码来源:SkImageFilter.cpp

示例4: INHERITED

SkShader::SkShader(SkFlattenableReadBuffer& buffer)
    : INHERITED(buffer), fLocalMatrix(NULL) {
    if (buffer.readBool()) {
        SkMatrix matrix;
        SkReadMatrix(&buffer, &matrix);
        setLocalMatrix(matrix);
    }
    SkDEBUGCODE(fInSession = false;)
}
开发者ID:4Fwolf,项目名称:mt6572_x201,代码行数:9,代码来源:SkShader.cpp

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

示例6: INHERITED

SkShader::SkShader(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer) {
    if (buffer.readBool()) {
        buffer.readMatrix(&fLocalMatrix);
    } else {
        fLocalMatrix.reset();
    }

    SkDEBUGCODE(fInSetContext = false;)
}
开发者ID:hicdre,项目名称:skiaui,代码行数:10,代码来源:SkShader.cpp

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

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

示例9: 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;
    fGenerationID = 0;  // signal to rebuild
    fIsImmutable = buffer.readBool();
    fPreLocked = false;
}
开发者ID:jrmuizel,项目名称:image-scaling,代码行数:10,代码来源:SkPixelRef.cpp

示例10: INHERITED

SkBlendImageFilter::SkBlendImageFilter(SkFlattenableReadBuffer& buffer)
  : INHERITED(buffer)
{
    fMode = (SkBlendImageFilter::Mode) buffer.readInt();
    fBackground = buffer.readFlattenableT<SkImageFilter>();
    if (buffer.readBool()) {
        fForeground = buffer.readFlattenableT<SkImageFilter>();
    } else {
        fForeground = NULL;
    }
}
开发者ID:gw280,项目名称:skia,代码行数:11,代码来源:SkBlendImageFilter.cpp

示例11:

SkPixelRef::SkPixelRef(SkFlattenableReadBuffer& buffer, SkMutex* mutex) {
    if (NULL == mutex) {
        mutex = &gPixelRefMutex;
    }
    fMutex = mutex;
    fPixels = NULL;
    fColorTable = NULL; // we do not track ownership of this
    fLockCount = 0;
    fGenerationID = 0;  // signal to rebuild
    fIsImmutable = buffer.readBool();
}
开发者ID:achellies,项目名称:DUI_LIb,代码行数:11,代码来源:SkPixelRef.cpp

示例12: INHERITED

SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer, NULL) {
    fSize = buffer.readU32();
    fStorage = sk_malloc_throw(fSize);
    buffer.read(fStorage, fSize);
    if (buffer.readBool()) {
        fCTable = SkNEW_ARGS(SkColorTable, (buffer));
    } else {
        fCTable = NULL;
    }
}
开发者ID:Beifeng,项目名称:WTL-DUI,代码行数:11,代码来源:SkMallocPixelRef.cpp

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

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

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


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