本文整理汇总了C++中SkFlattenableReadBuffer类的典型用法代码示例。如果您正苦于以下问题:C++ SkFlattenableReadBuffer类的具体用法?C++ SkFlattenableReadBuffer怎么用?C++ SkFlattenableReadBuffer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkFlattenableReadBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INHERITED
SkMorphologyImageFilter::SkMorphologyImageFilter(SkFlattenableReadBuffer& buffer)
: INHERITED(1, buffer) {
fRadius.fWidth = buffer.readInt();
fRadius.fHeight = buffer.readInt();
buffer.validate((fRadius.fWidth >= 0) &&
(fRadius.fHeight >= 0));
}
示例2: INHERITED
SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
fInheritColor = b.readU8();
if (fInheritColor) {
return;
}
fColor = b.readU32();
}
示例3: INHERITED
SkBitmapProcShader::SkBitmapProcShader(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer) {
buffer.readBitmap(&fRawBitmap);
fState.fTileModeX = buffer.readUInt();
fState.fTileModeY = buffer.readUInt();
fFlags = 0; // computed in setContext
}
示例4: INHERITED
SkLayerDrawLooper::SkLayerDrawLooper(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer),
fRecs(NULL),
fCount(0),
fCurrRec(NULL) {
int count = buffer.readInt();
for (int i = 0; i < count; i++) {
LayerInfo info;
info.fPaintBits = buffer.readInt();
info.fColorMode = (SkXfermode::Mode)buffer.readInt();
info.fOffset.fX = buffer.readScalar();
info.fOffset.fY = buffer.readScalar();
info.fPostTranslate = buffer.readBool();
this->addLayer(info)->unflatten(buffer);
}
SkASSERT(count == fCount);
// we're in reverse order, so fix it now
fRecs = Rec::Reverse(fRecs);
#ifdef SK_DEBUG
{
Rec* rec = fRecs;
int n = 0;
while (rec) {
rec = rec->fNext;
n += 1;
}
SkASSERT(count == n);
}
#endif
}
示例5: INHERITED
SkDisplacementMapEffect::SkDisplacementMapEffect(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer)
{
fXChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
fYChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
fScale = buffer.readScalar();
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_skia_src,代码行数:7,代码来源:SkDisplacementMapEffect.cpp
示例6: INHERITED
SkAvoidXfermode::SkAvoidXfermode(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer)
{
fOpColor = buffer.readU32();
fDistMul = buffer.readU32();
fMode = (Mode)buffer.readU8();
}
示例7: INHERITED
SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
fFlags = 0; // computed in setContext
fInheritColor = b.readU8();
if (fInheritColor) {
return;
}
fColor = b.readU32();
}
示例8: 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);
}
示例9: INHERITED
SkFlipPixelRef::SkFlipPixelRef(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer, NULL) {
fSize = buffer.readU32();
fStorage = sk_malloc_throw(fSize << 1);
fPage0 = fStorage;
fPage1 = (char*)fStorage + fSize;
buffer.read(fPage0, fSize);
}
示例10:
SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
{
fDx = buffer.readScalar();
fDy = buffer.readScalar();
fBlurColor = buffer.readU32();
fBlur = static_cast<SkMaskFilter*>(buffer.readFlattenable());
fColorFilter = static_cast<SkColorFilter*>(buffer.readFlattenable());
fBlurFlags = buffer.readU32() & kAll_BlurFlag;
}
示例11: INHERITED
SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer) {
fDx = buffer.readScalar();
fDy = buffer.readScalar();
fBlurColor = buffer.readColor();
fBlur = buffer.readMaskFilter();
fColorFilter = buffer.readColorFilter();
fBlurFlags = buffer.readUInt() & kAll_BlurFlag;
}
示例12: 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;
}
}
示例13: INHERITED
SkPixelRef::SkPixelRef(SkFlattenableReadBuffer& buffer, SkBaseMutex* mutex)
: INHERITED(buffer) {
this->setMutex(mutex);
fPixels = NULL;
fColorTable = NULL; // we do not track ownership of this
fLockCount = 0;
fIsImmutable = buffer.readBool();
fGenerationID = buffer.readUInt();
fPreLocked = false;
}
示例14: INHERITED
SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
SkDEBUGCODE(bool success =) buffer.readScalarArray(fCoefficients, 16);
SkASSERT(success);
fScale.fWidth = buffer.readScalar();
fScale.fHeight = buffer.readScalar();
buffer.validate(SkScalarIsFinite(fScale.fWidth) &&
SkScalarIsFinite(fScale.fHeight) &&
(fScale.fWidth >= 0) &&
(fScale.fHeight >= 0));
}
示例15: fInputCount
SkImageFilter::SkImageFilter(SkFlattenableReadBuffer& buffer)
: fInputCount(buffer.readInt()), fInputs(new SkImageFilter*[fInputCount]) {
for (int i = 0; i < fInputCount; i++) {
if (buffer.readBool()) {
fInputs[i] = static_cast<SkImageFilter*>(buffer.readFlattenable());
} else {
fInputs[i] = NULL;
}
}
}