Index: src/pdf/SkPDFGraphicState.cpp |
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp |
index 2bccac0cb94d1c92d69a3c4c79f63b1b33231334..121e583487e38d45fa087aaf2c5f6908d3e26dea 100644 |
--- a/src/pdf/SkPDFGraphicState.cpp |
+++ b/src/pdf/SkPDFGraphicState.cpp |
@@ -129,17 +129,17 @@ SkPDFGraphicState* SkPDFGraphicState::GetGraphicStateForPaint( |
static SkPDFObject* create_invert_function() { |
// Acrobat crashes if we use a type 0 function, kpdf crashes if we use |
// a type 2 function, so we use a type 4 function. |
- SkAutoTUnref<SkPDFArray> domainAndRange(new SkPDFArray); |
+ sk_sp<SkPDFArray> domainAndRange(new SkPDFArray); |
domainAndRange->reserve(2); |
domainAndRange->appendInt(0); |
domainAndRange->appendInt(1); |
static const char psInvert[] = "{1 exch sub}"; |
// Do not copy the trailing '\0' into the SkData. |
- SkAutoTUnref<SkData> psInvertStream( |
+ sk_sp<SkData> psInvertStream( |
SkData::NewWithoutCopy(psInvert, strlen(psInvert))); |
- SkAutoTUnref<SkPDFStream> invertFunction(new SkPDFStream(psInvertStream.get())); |
+ sk_sp<SkPDFStream> invertFunction(new SkPDFStream(psInvertStream.get())); |
invertFunction->insertInt("FunctionType", 4); |
invertFunction->insertObject("Domain", SkRef(domainAndRange.get())); |
invertFunction->insertObject("Range", domainAndRange.release()); |
@@ -154,7 +154,7 @@ SkPDFDict* SkPDFGraphicState::GetSMaskGraphicState(SkPDFFormXObject* sMask, |
SkPDFSMaskMode sMaskMode) { |
// The practical chances of using the same mask more than once are unlikely |
// enough that it's not worth canonicalizing. |
- SkAutoTUnref<SkPDFDict> sMaskDict(new SkPDFDict("Mask")); |
+ sk_sp<SkPDFDict> sMaskDict(new SkPDFDict("Mask")); |
if (sMaskMode == kAlpha_SMaskMode) { |
sMaskDict->insertName("S", "Alpha"); |
} else if (sMaskMode == kLuminosity_SMaskMode) { |
@@ -165,7 +165,7 @@ SkPDFDict* SkPDFGraphicState::GetSMaskGraphicState(SkPDFFormXObject* sMask, |
sMaskDict->insertObjRef("TR", SkRef(invertFunction.get(create_invert_function))); |
} |
- SkAutoTUnref<SkPDFDict> result(new SkPDFDict("ExtGState")); |
+ sk_sp<SkPDFDict> result(new SkPDFDict("ExtGState")); |
result->insertObject("SMask", sMaskDict.release()); |
return result.release(); |
} |
@@ -186,7 +186,7 @@ void SkPDFGraphicState::emitObject( |
SkWStream* stream, |
const SkPDFObjNumMap& objNumMap, |
const SkPDFSubstituteMap& substitutes) const { |
- SkAutoTUnref<SkPDFDict> dict(new SkPDFDict("ExtGState")); |
+ sk_sp<SkPDFDict> dict(new SkPDFDict("ExtGState")); |
dict->insertName("Type", "ExtGState"); |
SkScalar alpha = SkIntToScalar(fAlpha) / 0xFF; |