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

Unified Diff: src/pdf/SkPDFResourceDict.cpp

Issue 870333002: Simplify reference management in SkPDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make Created 5 years, 10 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
« no previous file with comments | « src/pdf/SkPDFResourceDict.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFResourceDict.cpp
diff --git a/src/pdf/SkPDFResourceDict.cpp b/src/pdf/SkPDFResourceDict.cpp
index 8a0208d64a0013a3c590b27496c0899999e0ed33..40fc1d8dc902342477b5eb181f334b20f19e33fd 100644
--- a/src/pdf/SkPDFResourceDict.cpp
+++ b/src/pdf/SkPDFResourceDict.cpp
@@ -77,27 +77,6 @@ SkPDFObject* SkPDFResourceDict::insertResourceAsReference(
return value;
}
-void SkPDFResourceDict::getReferencedResources(
- const SkTSet<SkPDFObject*>& knownResourceObjects,
- SkTSet<SkPDFObject*>* newResourceObjects,
- bool recursive) const {
- // TODO: reserve not correct if we need to recursively explore.
- newResourceObjects->setReserve(newResourceObjects->count() +
- fResources.count());
-
- for (int i = 0; i < fResources.count(); i++) {
- if (!knownResourceObjects.contains(fResources[i]) &&
- !newResourceObjects->contains(fResources[i])) {
- newResourceObjects->add(fResources[i]);
- fResources[i]->ref();
- if (recursive) {
- fResources[i]->getResources(knownResourceObjects,
- newResourceObjects);
- }
- }
- }
-}
-
SkString SkPDFResourceDict::getResourceName(
SkPDFResourceType type, int key) {
SkString keyString;
« no previous file with comments | « src/pdf/SkPDFResourceDict.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698