diff options
author | Mike Klein <mtklein@chromium.org> | 2017-05-01 21:34:14 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-01 21:36:43 +0000 |
commit | b34ab04884f6219b93c1f143c83a1fc60fded40c (patch) | |
tree | ba4a30663e7cb1cb926b4f4fe895eaebefbcfb21 /src/core/SkLiteDL.cpp | |
parent | cea615b4970d30933b40aadd56a1608c6f26b564 (diff) |
Revert "Revert "SaveLayerRec::fClipMask -> raw pointer""
This reverts commit 3354969a4a4adcea159f3a0b01ad0a7c04fc9115.
Reason for revert: not the problem?
Original change's description:
> Revert "SaveLayerRec::fClipMask -> raw pointer"
>
> This reverts commit a6b72cb5729306fdd676d739c1e2c53afa0786a7.
>
> Reason for revert: red bots
>
> Original change's description:
> > 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>
> >
>
> TBR=fmalita@chromium.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I4387620cdc3410018af9cef221e5cf8d09015380
> Reviewed-on: https://skia-review.googlesource.com/14955
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,reviews@skia.org,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I6dde9e0441928f7a7423139a5c39f520f892f4b5
Reviewed-on: https://skia-review.googlesource.com/14958
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@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); } |