void SkColor4Shader::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fColor4.fR); // writeFloat() buffer.writeScalar(fColor4.fG); buffer.writeScalar(fColor4.fB); buffer.writeScalar(fColor4.fA); buffer.writeBool(false); // TODO how do we flatten colorspaces? }
void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const { buffer.writeColor(fBlurColor); buffer.writeScalar(fSigma); buffer.writeScalar(fDx); buffer.writeScalar(fDy); buffer.write32(fBlurFlags); }
void SkPath1DPathEffect::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fAdvance); if (fAdvance > 0) { buffer.writePath(fPath); buffer.writeScalar(fInitialOffset); buffer.writeUInt(fStyle); } }
void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeScalar(fDx); buffer.writeScalar(fDy); buffer.writeScalar(fSigmaX); buffer.writeScalar(fSigmaY); buffer.writeColor(fColor); buffer.writeInt(static_cast<int>(fShadowMode)); }
void SkPerlinNoiseShader::flatten(SkWriteBuffer& buffer) const { buffer.writeInt((int) fType); buffer.writeScalar(fBaseFrequencyX); buffer.writeScalar(fBaseFrequencyY); buffer.writeInt(fNumOctaves); buffer.writeScalar(fSeed); buffer.writeInt(fTileSize.fWidth); buffer.writeInt(fTileSize.fHeight); }
void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const { SkASSERT(fInitialDashLength >= 0); this->INHERITED::flatten(buffer); buffer.writeInt(fInitialDashIndex); buffer.writeScalar(fInitialDashLength); buffer.writeScalar(fIntervalLength); buffer.writeBool(fScaleToFit); buffer.writeScalarArray(fIntervals, fCount); }
void flatten(SkWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); for (int i = 0; i < 4; ++i) { buffer.writeScalar(fK[i]); } buffer.writeBool(fEnforcePMColor); }
void SkEmbossMaskFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); Light tmpLight = fLight; tmpLight.fPad = 0; // for the font-cache lookup to be clean buffer.writeByteArray(&tmpLight, sizeof(tmpLight)); buffer.writeScalar(fBlurSigma); }
void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeInt(fKernelSize.fWidth); buffer.writeInt(fKernelSize.fHeight); buffer.writeScalarArray(fKernel, fKernelSize.fWidth * fKernelSize.fHeight); buffer.writeScalar(fGain); buffer.writeScalar(fBias); buffer.writeInt(fKernelOffset.fX); buffer.writeInt(fKernelOffset.fY); buffer.writeInt((int) fTileMode); buffer.writeBool(fConvolveAlpha); }
void SkLights::flatten(SkWriteBuffer& buf) const { buf.writeScalarArray(&this->ambientLightColor().fX, 3); buf.writeInt(this->numLights()); for (int l = 0; l < this->numLights(); ++l) { const Light& light = this->light(l); bool isPoint = Light::kPoint_LightType == light.type(); buf.writeBool(isPoint); buf.writeScalarArray(&light.color().fX, 3); buf.writeScalarArray(&light.dir().fX, 3); if (isPoint) { buf.writeScalar(light.intensity()); } } }
void SkDisplacementMapEffect::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeInt((int) fXChannelSelector); buffer.writeInt((int) fYChannelSelector); buffer.writeScalar(fScale); }
void SkComposeShader::flatten(SkWriteBuffer& buffer) const { buffer.writeFlattenable(fDst.get()); buffer.writeFlattenable(fSrc.get()); buffer.write32((int)fMode); buffer.writeScalar(fLerpT); }
void SkBlurImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeScalar(fSigma.fWidth); buffer.writeScalar(fSigma.fHeight); }
void SkGammaColorFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeScalar(fGamma); }
void SkMagnifierImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeRect(fSrcRect); buffer.writeScalar(fInset); }
void SkRadialGradient::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writePoint(fCenter); buffer.writeScalar(fRadius); }
void flatten(SkWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); buffer.writeScalar(fRadius); }
void SkCornerPathEffect::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeScalar(fRadius); }
void SkStrokePE::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fWidth); buffer.writeScalar(fMiter); buffer.write32(fJoin); buffer.write32(fCap); }
void SkLine2DPathEffect::flatten(SkWriteBuffer &buffer) const { buffer.writeMatrix(this->getMatrix()); buffer.writeScalar(fWidth); }
void SkCornerPathEffect::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fRadius); }
void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); buffer.writeScalar(fScale); }
void flatten(SkWriteBuffer& buffer) const override { buffer.writeMatrix(this->getMatrix()); buffer.writeScalar(fRadius); }
void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fPhase); buffer.writeScalarArray(fIntervals, fCount); }
void SkTrimPE::flatten(SkWriteBuffer& buffer) const { buffer.writeScalar(fStartT); buffer.writeScalar(fStopT); buffer.writeUInt(static_cast<uint32_t>(fMode)); }