Index: src/pdf/SkPDFGraphicState.cpp |
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp |
index 0e0873d9f0c8cc60bfb12e510f47f50559f6f411..46aa1d1ea40aa3d85ba85fb72ea899eabefbd68d 100644 |
--- a/src/pdf/SkPDFGraphicState.cpp |
+++ b/src/pdf/SkPDFGraphicState.cpp |
@@ -117,13 +117,6 @@ SkPDFGraphicState::~SkPDFGraphicState() { |
if (!fSMask) { |
SkPDFCanon::GetCanon().removeGraphicState(this); |
} |
- fResources.unrefAll(); |
-} |
- |
-void SkPDFGraphicState::getResources( |
- const SkTSet<SkPDFObject*>& knownResourceObjects, |
- SkTSet<SkPDFObject*>* newResourceObjects) { |
- GetResourcesHelper(&fResources, knownResourceObjects, newResourceObjects); |
} |
void SkPDFGraphicState::emitObject(SkWStream* stream, SkPDFCatalog* catalog) { |
@@ -174,11 +167,6 @@ SK_DECLARE_STATIC_LAZY_PTR(SkPDFObject, invertFunction, |
create_invert_function, unref<SkPDFObject>); |
// static |
-SkPDFObject* SkPDFGraphicState::GetInvertFunction() { |
- return invertFunction.get(); |
-} |
- |
-// static |
SkPDFGraphicState* SkPDFGraphicState::GetSMaskGraphicState( |
SkPDFFormXObject* sMask, bool invert, SkPDFSMaskMode sMaskMode) { |
// The practical chances of using the same mask more than once are unlikely |
@@ -196,14 +184,9 @@ SkPDFGraphicState* SkPDFGraphicState::GetSMaskGraphicState( |
result->fSMask = true; |
result->insertName("Type", "ExtGState"); |
result->insert("SMask", sMaskDict.get()); |
- result->fResources.push(sMask); |
- sMask->ref(); |
if (invert) { |
- SkPDFObject* invertFunction = GetInvertFunction(); |
- result->fResources.push(invertFunction); |
- invertFunction->ref(); |
- sMaskDict->insert("TR", new SkPDFObjRef(invertFunction))->unref(); |
+ sMaskDict->insert("TR", new SkPDFObjRef(invertFunction.get()))->unref(); |
} |
return result; |