diff options
author | 2013-05-22 12:35:50 +0000 | |
---|---|---|
committer | 2013-05-22 12:35:50 +0000 | |
commit | 8f838259ab65e44562902679fa88cb00575b99ce (patch) | |
tree | cb6224073c81152b0d00d693aae4e0b8ee2d4a8f /include/effects/SkLayerDrawLooper.h | |
parent | b148aca07e7cd0150bd9c750b54584f7f4c38cfb (diff) |
Add methods to SkLayerDrawLooper to allow adding layers on top
as well as on the bottom.
This is more convenient for some callers who generate layers
from a data structure in bottom-to-top, rather than top-to-bottom,
order.
BUG=242529
R=tomhudson@chromium.org
Author: jbroman@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15314003
git-svn-id: http://skia.googlecode.com/svn/trunk@9233 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects/SkLayerDrawLooper.h')
-rw-r--r-- | include/effects/SkLayerDrawLooper.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index bc1db1ae37..adf07a97a5 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -99,6 +99,9 @@ public: */ void addLayer() { this->addLayer(0, 0); } + /// 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); @@ -115,10 +118,9 @@ private: Rec* fNext; SkPaint fPaint; LayerInfo fInfo; - - static Rec* Reverse(Rec*); }; Rec* fRecs; + Rec* fTopRec; int fCount; // state-machine during the init/next cycle |