diff options
Diffstat (limited to 'src/core/SkLiteDL.cpp')
-rw-r--r-- | src/core/SkLiteDL.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp index 1565dae5cc..c5144e50fe 100644 --- a/src/core/SkLiteDL.cpp +++ b/src/core/SkLiteDL.cpp @@ -47,8 +47,8 @@ static const D* pod(const T* op, size_t offset = 0) { } namespace { -#define TYPES(M) \ - M(SetDrawFilter) M(Save) M(Restore) M(SaveLayer) \ +#define TYPES(M) \ + M(SetDrawFilter) M(Flush) M(Save) M(Restore) M(SaveLayer) \ M(Concat) M(SetMatrix) M(Translate) \ M(ClipPath) M(ClipRect) M(ClipRRect) M(ClipRegion) \ M(DrawPaint) M(DrawPath) M(DrawRect) M(DrawRegion) M(DrawOval) M(DrawArc) \ @@ -81,6 +81,11 @@ namespace { } }; + struct Flush final : Op { + static const auto kType = Type::Flush; + void draw(SkCanvas* c, const SkMatrix&) const { c->flush(); } + }; + struct Save final : Op { static const auto kType = Type::Save; void draw(SkCanvas* c, const SkMatrix&) const { c->save(); } @@ -530,6 +535,8 @@ void SkLiteDL::setDrawFilter(SkDrawFilter* df) { } #endif +void SkLiteDL::flush() { this->push<Flush>(0); } + void SkLiteDL:: save() { this->push <Save>(0); } void SkLiteDL::restore() { this->push<Restore>(0); } void SkLiteDL::saveLayer(const SkRect* bounds, const SkPaint* paint, |