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


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

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


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

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

示例2: flatten

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

    Light tmpLight = fLight;
    tmpLight.fPad = 0;    // for the font-cache lookup to be clean
    buffer.writeByteArray(&tmpLight, sizeof(tmpLight));
    buffer.writeScalar(fBlurSigma);
}
开发者ID:91yuan,项目名称:bones,代码行数:8,代码来源:SkEmbossMaskFilter.cpp

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

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

示例5: flatten

void SkPictureData::flatten(SkWriteBuffer& buffer) const {
    write_tag_size(buffer, SK_PICT_READER_TAG, fOpData->size());
    buffer.writeByteArray(fOpData->bytes(), fOpData->size());

    if (fPictureCount > 0) {
        write_tag_size(buffer, SK_PICT_PICTURE_TAG, fPictureCount);
        for (int i = 0; i < fPictureCount; i++) {
            fPictureRefs[i]->flatten(buffer);
        }
    }

    // Write this picture playback's data into a writebuffer
    this->flattenToBuffer(buffer);
    buffer.write32(SK_PICT_EOF_TAG);
}
开发者ID:AHPlankton,项目名称:skia,代码行数:15,代码来源:SkPictureData.cpp

示例6: flatten

void SkImageInfo::flatten(SkWriteBuffer& buffer) const {
    buffer.write32(fWidth);
    buffer.write32(fHeight);

    SkASSERT(0 == (fAlphaType & ~kAlphaTypeMask));
    SkASSERT(0 == (fColorType & ~kColorTypeMask));
    uint32_t packed = (fAlphaType << 8) | live_to_stored(fColorType);
    buffer.write32(packed);

    if (fColorSpace) {
        sk_sp<SkData> data = fColorSpace->serialize();
        if (data) {
            buffer.writeDataAsByteArray(data.get());
        } else {
            buffer.writeByteArray(nullptr, 0);
        }
    } else {
        sk_sp<SkData> data = SkData::MakeEmpty();
        buffer.writeDataAsByteArray(data.get());
    }
}
开发者ID:android,项目名称:platform_external_skia,代码行数:21,代码来源:SkImageInfo.cpp

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

示例8: Write

 static void Write(SkWriteBuffer& writer, unsigned char* data, uint32_t arraySize) {
     writer.writeByteArray(data, arraySize);
 }
开发者ID:vschs007,项目名称:skia,代码行数:3,代码来源:SerializationTest.cpp

示例9: flatten

void SkTableMaskFilter::flatten(SkWriteBuffer& wb) const {
    wb.writeByteArray(fTable, 256);
}
开发者ID:3rdexp,项目名称:soui,代码行数:3,代码来源:SkTableMaskFilter.cpp


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