本文整理汇总了C++中SkWriteBuffer::writeStream方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writeStream方法的具体用法?C++ SkWriteBuffer::writeStream怎么用?C++ SkWriteBuffer::writeStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkWriteBuffer
的用法示例。
在下文中一共展示了SkWriteBuffer::writeStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flatten
void SkImageRef::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeInt(fSampleSize);
buffer.writeBool(fDoDither);
// FIXME: Consider moving this logic should go into writeStream itself.
// writeStream currently has no other callers, so this may be fine for
// now.
if (!fStream->rewind()) {
SkDEBUGF(("Failed to rewind SkImageRef stream!"));
buffer.write32(0);
} else {
// FIXME: Handle getLength properly here. Perhaps this class should
// take an SkStreamAsset.
buffer.writeStream(fStream, fStream->getLength());
}
}