本文整理汇总了C++中SkFlattenableReadBuffer::readByteArray方法的典型用法代码示例。如果您正苦于以下问题:C++ SkFlattenableReadBuffer::readByteArray方法的具体用法?C++ SkFlattenableReadBuffer::readByteArray怎么用?C++ SkFlattenableReadBuffer::readByteArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkFlattenableReadBuffer
的用法示例。
在下文中一共展示了SkFlattenableReadBuffer::readByteArray方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INHERITED
SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
bool hasModes = buffer.readBool();
if (hasModes) {
this->initAllocModes();
SkASSERT(buffer.getArrayCount() == countInputs() * sizeof(fModes[0]));
buffer.readByteArray(fModes);
} else {
fModes = 0;
}
}
示例2: INHERITED
SkImageRef::SkImageRef(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer, &gImageRefMutex), fErrorInDecoding(false) {
fConfig = (SkBitmap::Config)buffer.readUInt();
fSampleSize = buffer.readInt();
fDoDither = buffer.readBool();
size_t length = buffer.getArrayCount();
fStream = SkNEW_ARGS(SkMemoryStream, (length));
buffer.readByteArray((void*)fStream->getMemoryBase());
fPrev = fNext = NULL;
fFactory = NULL;
}
示例3: INHERITED
SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer, NULL) {
fSize = buffer.getArrayCount();
fStorage = sk_malloc_throw(fSize);
buffer.readByteArray(fStorage);
if (buffer.readBool()) {
fCTable = buffer.readFlattenableT<SkColorTable>();
} else {
fCTable = NULL;
}
fOwnPixels = true;
this->setPreLocked(fStorage, fCTable);
}
示例4: INHERITED
SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
int storedCount = buffer.readInt();
this->initAlloc(SkAbs32(storedCount), storedCount < 0);
for (int i = 0; i < fCount; ++i) {
fFilters[i] = buffer.readFlattenableT<SkImageFilter>();
}
if (fModes) {
SkASSERT(storedCount < 0);
SkASSERT(buffer.getArrayCount() == fCount * sizeof(fModes[0]));
buffer.readByteArray(fModes);
} else {
SkASSERT(storedCount >= 0);
}
}
示例5: INHERITED
SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer, NULL)
, fOwnPixels(true)
{
fRB = buffer.read32();
size_t size = buffer.isValid() ? this->info().getSafeSize(fRB) : 0;
fStorage = sk_malloc_throw(size);
buffer.readByteArray(fStorage, size);
if (buffer.readBool()) {
fCTable = SkNEW_ARGS(SkColorTable, (buffer));
} else {
fCTable = NULL;
}
this->setPreLocked(fStorage, fCTable);
}
示例6: SkMaskFilter
SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer)
: SkMaskFilter(buffer) {
SkASSERT(buffer.getArrayCount() == sizeof(Light));
buffer.readByteArray(&fLight);
SkASSERT(fLight.fPad == 0); // for the font-cache lookup to be clean
fBlurSigma = buffer.readScalar();
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
// Fixing this must be done in two stages. When the skps are recaptured in V13,
// remove the ConvertRadiusToSigma but retain the absolute value.
// At the same time, switch the code in flatten to write a positive value.
// When the skps are captured in V14 the absolute value can be removed.
if (fBlurSigma > 0) {
fBlurSigma = SkBlurMask::ConvertRadiusToSigma(fBlurSigma);
} else {
fBlurSigma = -fBlurSigma;
}
#endif
}
示例7: INHERITED
SkTableMaskFilter::SkTableMaskFilter(SkFlattenableReadBuffer& rb)
: INHERITED(rb) {
SkASSERT(256 == rb.getArrayCount());
rb.readByteArray(fTable);
}