本文整理汇总了C++中SkWriteBuffer::writeBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writeBitmap方法的具体用法?C++ SkWriteBuffer::writeBitmap怎么用?C++ SkWriteBuffer::writeBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkWriteBuffer
的用法示例。
在下文中一共展示了SkWriteBuffer::writeBitmap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flatten
void flatten(SkWriteBuffer& buf) const override {
buf.writeBitmap(fDiffuseMap);
buf.writeBitmap(fNormalMap);
buf.writeScalarArray(&fLight.fDirection.fX, 3);
buf.writeColor(fLight.fColor);
buf.writeColor(fAmbientColor);
}
示例2: flatten
void SkBitmapProcShader::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeBitmap(fRawBitmap);
buffer.writeUInt(fTileModeX);
buffer.writeUInt(fTileModeY);
}
示例3: shuttleBitmap
bool SkGPipeCanvas::shuttleBitmap(const SkBitmap& bm, int32_t slot) {
SkASSERT(shouldFlattenBitmaps(fFlags));
SkWriteBuffer buffer;
buffer.setNamedFactoryRecorder(fFactorySet);
buffer.writeBitmap(bm);
this->flattenFactoryNames();
size_t size = buffer.bytesWritten();
if (this->needOpBytes(size)) {
this->writeOp(kDef_Bitmap_DrawOp, 0, slot);
void* dst = static_cast<void*>(fWriter.reserve(size));
buffer.writeToMemory(dst);
return true;
}
return false;
}
示例4: flattenToBuffer
void SkPictureData::flattenToBuffer(SkWriteBuffer& buffer) const {
int i, n;
if ((n = fBitmaps.count()) > 0) {
write_tag_size(buffer, SK_PICT_BITMAP_BUFFER_TAG, n);
for (i = 0; i < n; i++) {
buffer.writeBitmap(fBitmaps[i]);
}
}
if ((n = fPaints.count()) > 0) {
write_tag_size(buffer, SK_PICT_PAINT_BUFFER_TAG, n);
for (i = 0; i < n; i++) {
buffer.writePaint(fPaints[i]);
}
}
if ((n = fPaths.count()) > 0) {
write_tag_size(buffer, SK_PICT_PATH_BUFFER_TAG, n);
buffer.writeInt(n);
for (int i = 0; i < n; i++) {
buffer.writePath(fPaths[i]);
}
}
if (fTextBlobCount > 0) {
write_tag_size(buffer, SK_PICT_TEXTBLOB_BUFFER_TAG, fTextBlobCount);
for (i = 0; i < fTextBlobCount; ++i) {
fTextBlobRefs[i]->flatten(buffer);
}
}
if (fImageCount > 0) {
write_tag_size(buffer, SK_PICT_IMAGE_BUFFER_TAG, fImageCount);
for (i = 0; i < fImageCount; ++i) {
buffer.writeImage(fImageRefs[i]);
}
}
}
示例5: flatten
void SkBitmapProcShader::flatten(SkWriteBuffer& buffer) const {
buffer.writeMatrix(this->getLocalMatrix());
buffer.writeBitmap(fRawBitmap);
buffer.writeUInt(fTileModeX);
buffer.writeUInt(fTileModeY);
}