Index: src/pdf/SkPDFGraphicState.cpp |
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp |
index 7b793e6ea8df4fbf3c2861e2174814ccc118dd91..5a603ce8da4f1f571650a5b28bd866cadd86f9e4 100644 |
--- a/src/pdf/SkPDFGraphicState.cpp |
+++ b/src/pdf/SkPDFGraphicState.cpp |
@@ -144,7 +144,7 @@ sk_sp<SkPDFStream> SkPDFGraphicState::MakeInvertFunction() { |
} |
sk_sp<SkPDFDict> SkPDFGraphicState::GetSMaskGraphicState( |
- SkPDFObject* sMask, |
+ sk_sp<SkPDFObject> sMask, |
bool invert, |
SkPDFSMaskMode sMaskMode, |
SkPDFCanon* canon) { |
@@ -156,7 +156,7 @@ sk_sp<SkPDFDict> SkPDFGraphicState::GetSMaskGraphicState( |
} else if (sMaskMode == kLuminosity_SMaskMode) { |
sMaskDict->insertName("S", "Luminosity"); |
} |
- sMaskDict->insertObjRef("G", sk_ref_sp(sMask)); |
+ sMaskDict->insertObjRef("G", std::move(sMask)); |
if (invert) { |
// Instead of calling SkPDFGraphicState::MakeInvertFunction, |
// let the canon deduplicate this object. |