Index: include/effects/SkLayerDrawLooper.h |
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h |
index 6955192b53f2e6f9edeb94f49efd0858a8a73b2b..edffee648660d6d89aa1224d0cfb87c44c445751 100644 |
--- a/include/effects/SkLayerDrawLooper.h |
+++ b/include/effects/SkLayerDrawLooper.h |
@@ -102,9 +102,8 @@ public: |
/// Similar to addLayer, but adds a layer to the top. |
SkPaint* addLayerOnTop(const LayerInfo&); |
- // overrides from SkDrawLooper |
- virtual void init(SkCanvas*); |
- virtual bool next(SkCanvas*, SkPaint* paint); |
+ virtual SkDrawLooper::DrawContext* init( |
+ SkCanvas*, void* storage, size_t storageSize) const SK_OVERRIDE; |
SK_DEVELOPER_TO_STRING() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper) |
@@ -124,9 +123,18 @@ private: |
int fCount; |
// state-machine during the init/next cycle |
- Rec* fCurrRec; |
+ class LayerDrawLooperContext : public SkDrawLooper::DrawContext { |
reed1
2014/02/07 14:46:02
Just for public brevity, can this definition be mo
Dominik Grewe
2014/02/07 16:59:17
If we move this definition out of the class scope
|
+ public: |
+ explicit LayerDrawLooperContext(const SkLayerDrawLooper* looper); |
+ |
+ protected: |
+ virtual bool next(SkCanvas*, SkPaint* paint) SK_OVERRIDE; |
- static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&); |
+ private: |
+ Rec* fCurrRec; |
+ |
+ static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&); |
+ }; |
class MyRegistrar : public SkFlattenable::Registrar { |
public: |