本文整理汇总了C++中SkWriteBuffer::writeRect方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writeRect方法的具体用法?C++ SkWriteBuffer::writeRect怎么用?C++ SkWriteBuffer::writeRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkWriteBuffer
的用法示例。
在下文中一共展示了SkWriteBuffer::writeRect方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flatten
void SkRecordedDrawable::flatten(SkWriteBuffer& buffer) const {
// Write the bounds.
buffer.writeRect(fBounds);
// Create an SkPictureRecord to record the draw commands.
SkPictInfo info;
SkPictureRecord pictureRecord(SkISize::Make(fBounds.width(), fBounds.height()), 0);
// If the query contains the whole picture, don't bother with the bounding box hierarchy.
SkRect clipBounds;
pictureRecord.getClipBounds(&clipBounds);
SkBBoxHierarchy* bbh;
if (clipBounds.contains(fBounds)) {
bbh = nullptr;
} else {
bbh = fBBH.get();
}
// Record the draw commands.
pictureRecord.beginRecording();
SkRecordDraw(*fRecord, &pictureRecord, nullptr, fDrawableList->begin(), fDrawableList->count(),
bbh, nullptr);
pictureRecord.endRecording();
// Flatten the recorded commands and drawables.
SkPictureData pictureData(pictureRecord, info);
pictureData.flatten(buffer);
}
示例2: flatten
void SkPictureShader::flatten(SkWriteBuffer& buffer) const {
buffer.writeMatrix(this->getLocalMatrix());
buffer.write32(fTmx);
buffer.write32(fTmy);
buffer.writeRect(fTile);
fPicture->flatten(buffer);
}
示例3: 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());
}
示例4: 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);
}
示例5: 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);
}
}
示例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 SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeRect(fSrcRect);
buffer.writeRect(fDstRect);
}
示例8: flatten
void SkMagnifierImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeRect(fSrcRect);
buffer.writeScalar(fInset);
}
示例9: flatten
void SkImageSource::flatten(SkWriteBuffer& buffer) const {
buffer.writeInt(fFilterQuality);
buffer.writeRect(fSrcRect);
buffer.writeRect(fDstRect);
buffer.writeImage(fImage);
}