| Index: src/pipe/SkGPipeRead.cpp
|
| diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
|
| index ac0aaddeadbe1ac6be826a7d7744fc6f69c599ab..e76ec1240aa005990223f51857da6d45b6ab2350 100644
|
| --- a/src/pipe/SkGPipeRead.cpp
|
| +++ b/src/pipe/SkGPipeRead.cpp
|
| @@ -18,6 +18,7 @@
|
| #include "SkAnnotation.h"
|
| #include "SkColorFilter.h"
|
| #include "SkDrawLooper.h"
|
| +#include "SkImageFilter.h"
|
| #include "SkMaskFilter.h"
|
| #include "SkOrderedReadBuffer.h"
|
| #include "SkPathEffect.h"
|
| @@ -27,6 +28,22 @@
|
| #include "SkTypeface.h"
|
| #include "SkXfermode.h"
|
|
|
| +static SkEffectType paintflat_to_effecttype(PaintFlats pf) {
|
| + static const uint8_t gEffectTypesInPaintFlatsOrder[] = {
|
| + kColorFilter_SkEffectType,
|
| + kDrawLooper_SkEffectType,
|
| + kImageFilter_SkEffectType,
|
| + kMaskFilter_SkEffectType,
|
| + kPathEffect_SkEffectType,
|
| + kRasterizer_SkEffectType,
|
| + kShader_SkEffectType,
|
| + kXfermode_SkEffectType,
|
| + };
|
| +
|
| + SkASSERT((size_t)pf < SK_ARRAY_COUNT(gEffectTypesInPaintFlatsOrder));
|
| + return (SkEffectType)gEffectTypesInPaintFlatsOrder[pf];
|
| +}
|
| +
|
| static void set_paintflat(SkPaint* paint, SkFlattenable* obj, unsigned paintFlat) {
|
| SkASSERT(paintFlat < kCount_PaintFlats);
|
| switch (paintFlat) {
|
| @@ -105,7 +122,7 @@ public:
|
|
|
| void defFlattenable(PaintFlats pf, int index) {
|
| index--;
|
| - SkFlattenable* obj = fReader->readFlattenable();
|
| + SkFlattenable* obj = fReader->readFlattenable(paintflat_to_effecttype(pf));
|
| if (fFlatArray.count() == index) {
|
| *fFlatArray.append() = obj;
|
| } else {
|
|
|