diff options
author | Florin Malita <fmalita@chromium.org> | 2017-05-01 12:17:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-01 21:26:01 +0000 |
commit | a6b72cb5729306fdd676d739c1e2c53afa0786a7 (patch) | |
tree | ba4a30663e7cb1cb926b4f4fe895eaebefbcfb21 /src/core/SkLiteDL.cpp | |
parent | 5664e65eb1680a14eeaa6ca79ddf9e734518c822 (diff) |
SaveLayerRec::fClipMask -> raw pointer
Use raw pointers for optional clip mask plumbing, to match the backdrop
API.
Change-Id: I7eb0ee5896faf34cc05789ba0703f35a4ab6a4f2
Reviewed-on: https://skia-review.googlesource.com/14901
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkLiteDL.cpp')
-rw-r--r-- | src/core/SkLiteDL.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp index f84060751e..71cbf681eb 100644 --- a/src/core/SkLiteDL.cpp +++ b/src/core/SkLiteDL.cpp @@ -91,23 +91,23 @@ namespace { struct SaveLayer final : Op { static const auto kType = Type::SaveLayer; SaveLayer(const SkRect* bounds, const SkPaint* paint, - const SkImageFilter* backdrop, sk_sp<SkImage> clipMask, + const SkImageFilter* backdrop, const SkImage* clipMask, const SkMatrix* clipMatrix, SkCanvas::SaveLayerFlags flags) { if (bounds) { this->bounds = *bounds; } if (paint) { this->paint = *paint; } this->backdrop = sk_ref_sp(backdrop); - this->clipMask = std::move(clipMask); + this->clipMask = sk_ref_sp(clipMask); this->clipMatrix = clipMatrix ? *clipMatrix : SkMatrix::I(); this->flags = flags; } SkRect bounds = kUnset; SkPaint paint; sk_sp<const SkImageFilter> backdrop; - sk_sp<SkImage> clipMask; + sk_sp<const SkImage> clipMask; SkMatrix clipMatrix; SkCanvas::SaveLayerFlags flags; void draw(SkCanvas* c, const SkMatrix&) const { - c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask, + c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask.get(), clipMatrix.isIdentity() ? nullptr : &clipMatrix, flags }); } }; @@ -550,9 +550,9 @@ void SkLiteDL::setDrawFilter(SkDrawFilter* df) { void SkLiteDL:: save() { this->push <Save>(0); } void SkLiteDL::restore() { this->push<Restore>(0); } void SkLiteDL::saveLayer(const SkRect* bounds, const SkPaint* paint, - const SkImageFilter* backdrop, sk_sp<SkImage> clipMask, + const SkImageFilter* backdrop, const SkImage* clipMask, const SkMatrix* clipMatrix, SkCanvas::SaveLayerFlags flags) { - this->push<SaveLayer>(0, bounds, paint, backdrop, std::move(clipMask), clipMatrix, flags); + this->push<SaveLayer>(0, bounds, paint, backdrop, clipMask, clipMatrix, flags); } void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); } |