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


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

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


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

示例1: INHERITED

SkGradientShaderBase::SkGradientShaderBase(SkFlattenableReadBuffer& buffer) :
    INHERITED(buffer) {
    fCacheAlpha = 256;

    fMapper = buffer.readFlattenableT<SkUnitMapper>();

    fCache16 = fCache16Storage = NULL;
    fCache32 = NULL;
    fCache32PixelRef = NULL;

    int colorCount = fColorCount = buffer.getArrayCount();
    if (colorCount > kColorStorageCount) {
        size_t size = sizeof(SkColor) + sizeof(SkPMColor) + sizeof(Rec);
        fOrigColors = (SkColor*)sk_malloc_throw(size * colorCount);
    } else {
        fOrigColors = fStorage;
    }
    buffer.readColorArray(fOrigColors);

    fTileMode = (TileMode)buffer.readUInt();
    fTileProc = gTileProcs[fTileMode];
    fRecs = (Rec*)(fOrigColors + colorCount);
    if (colorCount > 2) {
        Rec* recs = fRecs;
        recs[0].fPos = 0;
        for (int i = 1; i < colorCount; i++) {
            recs[i].fPos = buffer.readInt();
            recs[i].fScale = buffer.readUInt();
        }
    }
    buffer.readMatrix(&fPtsToUnit);
    this->initCommon();
}
开发者ID:mikeaich,项目名称:releases-mozilla-central,代码行数:33,代码来源:SkGradientShader.cpp

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

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

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

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

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

示例7: SkModeColorFilter

 SkModeColorFilter(SkFlattenableReadBuffer& buffer) {
     fColor = buffer.readColor();
     fMode = (SkXfermode::Mode)buffer.readUInt();
     this->updateCache();
     buffer.validate(SkIsValidMode(fMode));
 }
开发者ID:rzr,项目名称:Tizen_Crosswalk,代码行数:6,代码来源:SkColorFilters.cpp

示例8: INHERITED

SkAnnotation::SkAnnotation(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    fFlags = buffer.readUInt();
    fDataSet = buffer.readFlattenableT<SkDataSet>();
}
开发者ID:ConradIrwin,项目名称:gecko-dev,代码行数:4,代码来源:SkAnnotation.cpp

示例9: INHERITED

SkLumaMaskXfermode::SkLumaMaskXfermode(SkFlattenableReadBuffer& buffer)
    : INHERITED(buffer)
    , fMode((SkXfermode::Mode)buffer.readUInt()) {
    SkASSERT(kSrcIn_Mode == fMode || kDstIn_Mode == fMode);
}
开发者ID:andreicoman11,项目名称:OsmAnd-external-skia,代码行数:5,代码来源:SkLumaXfermode.cpp


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