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


C++ SkWriteBuffer::writeBool方法代码示例

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


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

示例1: flatten

void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    if (!buffer.isCrossProcess()) {
        bool hasPicture = (fPicture != NULL);
        buffer.writeBool(hasPicture);
        if (hasPicture) {
            fPicture->flatten(buffer);
        }
    } else {
        buffer.writeBool(false);
    }
    buffer.writeRect(fCropRect);
}
开发者ID:Adenilson,项目名称:skia,代码行数:13,代码来源:SkPictureImageFilter.cpp

示例2: flatten

void SkPicture::flatten(SkWriteBuffer& buffer) const {
    SkPictInfo info = this->createHeader();
    SkAutoTDelete<SkPictureData> data(this->backport());

    buffer.writeByteArray(&info.fMagic, sizeof(info.fMagic));
    buffer.writeUInt(info.fVersion);
    buffer.writeRect(info.fCullRect);
    buffer.writeUInt(info.fFlags);
    if (data) {
        buffer.writeBool(true);
        data->flatten(buffer);
    } else {
        buffer.writeBool(false);
    }
}
开发者ID:BertiKarsunke,项目名称:skia,代码行数:15,代码来源:SkPicture.cpp

示例3: flatten

 void flatten(SkWriteBuffer& buffer) const override {
     this->INHERITED::flatten(buffer);
     for (int i = 0; i < 4; ++i) {
         buffer.writeScalar(fK[i]);
     }
     buffer.writeBool(fEnforcePMColor);
 }
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:7,代码来源:SkArithmeticImageFilter.cpp

示例4: writeFloat

void SkColor4Shader::flatten(SkWriteBuffer& buffer) const {
    buffer.writeScalar(fColor4.fR); // writeFloat()
    buffer.writeScalar(fColor4.fG);
    buffer.writeScalar(fColor4.fB);
    buffer.writeScalar(fColor4.fA);
    buffer.writeBool(false);    // TODO how do we flatten colorspaces?
}
开发者ID:03050903,项目名称:skia,代码行数:7,代码来源:SkColorShader.cpp

示例5: flatten

void SkMergeImageFilter::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    buffer.writeBool(fModes != nullptr);
    if (fModes) {
        buffer.writeByteArray(fModes, this->countInputs() * sizeof(fModes[0]));
    }
}
开发者ID:YangchenVR,项目名称:skia,代码行数:7,代码来源:SkMergeImageFilter.cpp

示例6: flatten

void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
    if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
        buffer.writeBool(false);
    } else {
        bool hasPicture = (fPicture != NULL);
        buffer.writeBool(hasPicture);
        if (hasPicture) {
            fPicture->flatten(buffer);
        }
    }
    buffer.writeRect(fCropRect);
    buffer.writeInt(fPictureResolution);
    if (kLocalSpace_PictureResolution == fPictureResolution) {
        buffer.writeInt(fFilterQuality);
    }
}
开发者ID:mto,项目名称:skia,代码行数:16,代码来源:SkPictureImageFilter.cpp

示例7: flatten

void SkShader::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    bool hasLocalM = !fLocalMatrix.isIdentity();
    buffer.writeBool(hasLocalM);
    if (hasLocalM) {
        buffer.writeMatrix(fLocalMatrix);
    }
}
开发者ID:fluxxion82,项目名称:skia,代码行数:8,代码来源:SkShader.cpp

示例8: flatten

void SkPaintOptionsAndroid::flatten(SkWriteBuffer& buffer) const {
    buffer.writeUInt(fFontVariant);
#ifdef SKLANG_OPT
    buffer.writeString(getLanguage().getTag().c_str());
#else
    buffer.writeString(fLanguage.getTag().c_str());
#endif
    buffer.writeBool(fUseFontFallbacks);
}
开发者ID:DARKPOP,项目名称:external_skia,代码行数:9,代码来源:SkPaintOptionsAndroid.cpp

示例9: flatten

void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const {
    SkASSERT(fInitialDashLength >= 0);

    this->INHERITED::flatten(buffer);
    buffer.writeInt(fInitialDashIndex);
    buffer.writeScalar(fInitialDashLength);
    buffer.writeScalar(fIntervalLength);
    buffer.writeBool(fScaleToFit);
    buffer.writeScalarArray(fIntervals, fCount);
}
开发者ID:JCROM-FxOS,项目名称:b2jc_gecko,代码行数:10,代码来源:SkDashPathEffect.cpp

示例10: flatten

void SkPerlinNoiseShader::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    buffer.writeInt((int) fType);
    buffer.writeScalar(fBaseFrequencyX);
    buffer.writeScalar(fBaseFrequencyY);
    buffer.writeInt(fNumOctaves);
    buffer.writeScalar(fSeed);
    buffer.writeBool(fStitchTiles);
    buffer.writeInt(fTileSize.fWidth);
    buffer.writeInt(fTileSize.fHeight);
}
开发者ID:miaoshunping,项目名称:skia,代码行数:11,代码来源:SkPerlinNoiseShader.cpp

示例11: flatten

void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
    buffer.writeInt(fInputCount);
    for (int i = 0; i < fInputCount; i++) {
        SkImageFilter* input = this->getInput(i);
        buffer.writeBool(input != nullptr);
        if (input != nullptr) {
            buffer.writeFlattenable(input);
        }
    }
    buffer.writeRect(fCropRect.rect());
    buffer.writeUInt(fCropRect.flags());
}
开发者ID:davidleen,项目名称:skia,代码行数:12,代码来源:SkImageFilter.cpp

示例12: flatten

void SkPicture::flatten(SkWriteBuffer& buffer) const {
    SkPicturePlayback* playback = fPlayback;

    if (NULL == playback && fRecord) {
        playback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
    }

    SkPictInfo header;
    this->createHeader(&header);
    buffer.writeByteArray(&header, sizeof(header));
    if (playback) {
        buffer.writeBool(true);
        playback->flatten(buffer);
        // delete playback if it is a local version (i.e. cons'd up just now)
        if (playback != fPlayback) {
            SkDELETE(playback);
        }
    } else {
        buffer.writeBool(false);
    }
}
开发者ID:UIKit0,项目名称:skia,代码行数:21,代码来源:SkPicture.cpp

示例13: flatten

void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    buffer.writeInt(fKernelSize.fWidth);
    buffer.writeInt(fKernelSize.fHeight);
    buffer.writeScalarArray(fKernel, fKernelSize.fWidth * fKernelSize.fHeight);
    buffer.writeScalar(fGain);
    buffer.writeScalar(fBias);
    buffer.writeInt(fKernelOffset.fX);
    buffer.writeInt(fKernelOffset.fY);
    buffer.writeInt((int) fTileMode);
    buffer.writeBool(fConvolveAlpha);
}
开发者ID:Just-D,项目名称:skia,代码行数:12,代码来源:SkMatrixConvolutionImageFilter.cpp

示例14: flatten

void SkMallocPixelRef::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);

    buffer.write32(SkToU32(fRB));

    // TODO: replace this bulk write with a chunky one that can trim off any
    // trailing bytes on each scanline (in case rowbytes > width*size)
    size_t size = this->info().getSafeSize(fRB);
    buffer.writeByteArray(fStorage, size);
    buffer.writeBool(fCTable != NULL);
    if (fCTable) {
        fCTable->writeToBuffer(buffer);
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:14,代码来源:SkMallocPixelRef.cpp

示例15: flatten

void SkLayerDrawLooper::flatten(SkWriteBuffer& buffer) const {
    buffer.writeInt(fCount);

    Rec* rec = fRecs;
    for (int i = 0; i < fCount; i++) {
        // Legacy "flagsmask" field -- now ignored, remove when we bump version
        buffer.writeInt(0);

        buffer.writeInt(rec->fInfo.fPaintBits);
        buffer.writeInt(rec->fInfo.fColorMode);
        buffer.writePoint(rec->fInfo.fOffset);
        buffer.writeBool(rec->fInfo.fPostTranslate);
        buffer.writePaint(rec->fPaint);
        rec = rec->fNext;
    }
}
开发者ID:435420057,项目名称:soui,代码行数:16,代码来源:SkLayerDrawLooper.cpp


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