aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLiteDL.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-05-01 21:31:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-01 21:31:40 +0000
commit3354969a4a4adcea159f3a0b01ad0a7c04fc9115 (patch)
tree13252cb3eb06b80d7a05f8063ac339e1847c84d5 /src/core/SkLiteDL.cpp
parentc59a38d12dce287427f3d3fe1d4b3ad8052cda35 (diff)
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>
Diffstat (limited to 'src/core/SkLiteDL.cpp')
-rw-r--r--src/core/SkLiteDL.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp
index 71cbf681eb..f84060751e 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, const SkImage* clipMask,
+ const SkImageFilter* backdrop, sk_sp<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 = sk_ref_sp(clipMask);
+ this->clipMask = std::move(clipMask);
this->clipMatrix = clipMatrix ? *clipMatrix : SkMatrix::I();
this->flags = flags;
}
SkRect bounds = kUnset;
SkPaint paint;
sk_sp<const SkImageFilter> backdrop;
- sk_sp<const SkImage> clipMask;
+ sk_sp<SkImage> clipMask;
SkMatrix clipMatrix;
SkCanvas::SaveLayerFlags flags;
void draw(SkCanvas* c, const SkMatrix&) const {
- c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask.get(),
+ c->saveLayer({ maybe_unset(bounds), &paint, backdrop.get(), clipMask,
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, const SkImage* clipMask,
+ const SkImageFilter* backdrop, sk_sp<SkImage> clipMask,
const SkMatrix* clipMatrix, SkCanvas::SaveLayerFlags flags) {
- this->push<SaveLayer>(0, bounds, paint, backdrop, clipMask, clipMatrix, flags);
+ this->push<SaveLayer>(0, bounds, paint, backdrop, std::move(clipMask), clipMatrix, flags);
}
void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); }