Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: src/pdf/SkPDFGraphicState.cpp

Issue 870333002: Simplify reference management in SkPDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tests Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 0e0873d9f0c8cc60bfb12e510f47f50559f6f411..77379ed2feb3240331d830860b8966276257a45d 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) {
@@ -196,13 +189,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();
mtklein 2015/01/26 23:38:59 Might move the call to GetInvertFunction() right i
hal.canary 2015/02/09 23:35:01 Done.
}

Powered by Google App Engine
This is Rietveld 408576698