| Index: include/effects/SkLayerDrawLooper.h
|
| diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h
|
| index 6955192b53f2e6f9edeb94f49efd0858a8a73b2b..7821e1a8f595bf851db0eff943fa8a17125f9c71 100644
|
| --- a/include/effects/SkLayerDrawLooper.h
|
| +++ b/include/effects/SkLayerDrawLooper.h
|
| @@ -103,8 +103,7 @@ public:
|
| SkPaint* addLayerOnTop(const LayerInfo&);
|
|
|
| // overrides from SkDrawLooper
|
| - virtual void init(SkCanvas*);
|
| - virtual bool next(SkCanvas*, SkPaint* paint);
|
| + virtual SkDrawLooper::DrawContext* init(SkCanvas*) const;
|
|
|
| SK_DEVELOPER_TO_STRING()
|
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper)
|
| @@ -113,6 +112,9 @@ protected:
|
| SkLayerDrawLooper(SkReadBuffer&);
|
| virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
|
|
|
| + virtual bool next_internal(SkCanvas*, SkPaint* paint,
|
| + SkDrawLooper::DrawContext* context) const;
|
| +
|
| private:
|
| struct Rec {
|
| Rec* fNext;
|
| @@ -124,7 +126,10 @@ private:
|
| int fCount;
|
|
|
| // state-machine during the init/next cycle
|
| - Rec* fCurrRec;
|
| + struct SkLayerDrawLooperContext : public SkDrawLooper::DrawContext {
|
| + explicit SkLayerDrawLooperContext(const SkLayerDrawLooper* looper);
|
| + Rec* fCurrRec;
|
| + };
|
|
|
| static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&);
|
|
|
|
|