本文整理汇总了C++中SkFlattenableReadBuffer::readS32方法的典型用法代码示例。如果您正苦于以下问题:C++ SkFlattenableReadBuffer::readS32方法的具体用法?C++ SkFlattenableReadBuffer::readS32怎么用?C++ SkFlattenableReadBuffer::readS32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkFlattenableReadBuffer
的用法示例。
在下文中一共展示了SkFlattenableReadBuffer::readS32方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SkMaskFilter
SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer)
{
fRadius = buffer.readScalar();
fBlurStyle = (SkBlurMaskFilter::BlurStyle)buffer.readS32();
fBlurFlags = buffer.readU32() & SkBlurMaskFilter::kAll_BlurFlag;
SkASSERT(fRadius >= 0);
SkASSERT((unsigned)fBlurStyle < SkBlurMaskFilter::kBlurStyleCount);
}
示例2: INHERITED
SkGroupShape::SkGroupShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer){
int count = buffer.readS32();
for (int i = 0; i < count; i++) {
SkShape* shape = reinterpret_cast<SkShape*>(buffer.readFlattenable());
SkMatrixRef* mr = NULL;
uint32_t size = buffer.readS32();
if (size) {
char storage[SkMatrix::kMaxFlattenSize];
buffer.read(storage, SkAlign4(size));
mr = SkNEW(SkMatrixRef);
mr->unflatten(storage);
}
if (shape) {
this->appendShape(shape, mr)->unref();
}
SkSafeUnref(mr);
}
}
示例3: INHERITED
SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
int storedCount = buffer.readS32();
this->initAlloc(SkAbs32(storedCount), storedCount < 0);
for (int i = 0; i < fCount; ++i) {
fFilters[i] = (SkImageFilter*)buffer.readFlattenable();
}
if (fModes) {
SkASSERT(storedCount < 0);
buffer.read(fModes, fCount * sizeof(fModes[0]));
} else {
SkASSERT(storedCount >= 0);
}
}
示例4: SkRasterizer
SkLayerRasterizer::SkLayerRasterizer(SkFlattenableReadBuffer& buffer)
: SkRasterizer(buffer), fLayers(sizeof(SkLayerRasterizer_Rec))
{
int count = buffer.readS32();
for (int i = 0; i < count; i++)
{
SkLayerRasterizer_Rec* rec = (SkLayerRasterizer_Rec*)fLayers.push_back();
#if 0
new (&rec->fPaint) SkPaint(buffer);
#else
new (&rec->fPaint) SkPaint;
paint_read(&rec->fPaint, buffer);
#endif
rec->fOffset.fX = buffer.readScalar();
rec->fOffset.fY = buffer.readScalar();
}
}
示例5: SkPowerMode
SkPowerMode(SkFlattenableReadBuffer& b) : SkXfermode(b) {
// read the exponent
this->init(SkFixedToScalar(b.readS32()));
}