本文整理汇总了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);
}
示例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);
}
}
示例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);
}
示例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?
}
示例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]));
}
}
示例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);
}
}
示例7: flatten
void SkShader::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
bool hasLocalM = !fLocalMatrix.isIdentity();
buffer.writeBool(hasLocalM);
if (hasLocalM) {
buffer.writeMatrix(fLocalMatrix);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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;
}
}