Register some flattenable factories.

Now, SkComposeShaders, SkDiscreteMapper, SkCosineMapper,
Line2DPathEffect, and SkTransparentShader can be flattened
and unflattened. This makes more of our samples work when
using a pipe.

Review URL: https://codereview.appspot.com/6338064

git-svn-id: http://skia.googlecode.com/svn/trunk@4334 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
scroggo@google.com 2012-06-25 20:32:12 +00:00
parent 5b2e01c0d2
commit 6eb0d62cc3
4 changed files with 8 additions and 0 deletions

View File

@ -250,6 +250,8 @@ private:
typedef Sk2DPathEffect INHERITED;
};
SK_DEFINE_FLATTENABLE_REGISTRAR(Line2DPathEffect)
static void r9(SkLayerRasterizer* rast, SkPaint& p) {
rast->addLayer(p);

View File

@ -165,3 +165,5 @@ void SkComposeShader::shadeSpan(int x, int y, SkPMColor result[], int count) {
}
}
SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposeShader)

View File

@ -125,3 +125,5 @@ void SkTransparentShader::shadeSpan16(int x, int y, uint16_t span[], int count)
memcpy(span, src, count << 1);
}
}
SK_DEFINE_FLATTENABLE_REGISTRAR(SkTransparentShader)

View File

@ -57,3 +57,5 @@ uint16_t SkCosineMapper::mapUnit16(uint16_t input)
SkCosineMapper::SkCosineMapper(SkFlattenableReadBuffer& rb)
: SkUnitMapper(rb) {}
SK_DEFINE_FLATTENABLE_REGISTRAR(SkDiscreteMapper)
SK_DEFINE_FLATTENABLE_REGISTRAR(SkCosineMapper)