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

Unified Diff: src/pdf/SkPDFCatalog.h

Issue 1049753002: SkPDF: Factor SkPDFCatalog into SkPDFObjNumMap and SkPDFSubstituteMap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: full Created 5 years, 9 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/SkPDFCatalog.h
diff --git a/src/pdf/SkPDFCatalog.h b/src/pdf/SkPDFCatalog.h
deleted file mode 100644
index 3609f3cbdb38d83ea7ff757d6171ffdf882b7392..0000000000000000000000000000000000000000
--- a/src/pdf/SkPDFCatalog.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/*
- * Copyright 2010 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkPDFCatalog_DEFINED
-#define SkPDFCatalog_DEFINED
-
-#include "SkPDFTypes.h"
-#include "SkTDArray.h"
-#include "SkTHash.h"
-
-/** \class SkPDFCatalog
-
- The PDF catalog manages object numbers. It is used
- to create the PDF cross reference table.
-*/
-class SkPDFCatalog {
-public:
- SkPDFCatalog();
- ~SkPDFCatalog();
-
- /** Add the passed object to the catalog.
- * @param obj The object to add.
- * @return True iff the object was not already added to the catalog.
- */
- bool addObject(SkPDFObject* obj);
-
- /** Get the object number for the passed object.
- * @param obj The object of interest.
- */
- int32_t getObjectNumber(SkPDFObject* obj) const;
-
- /** Set substitute object for the passed object.
- Refs substitute.
- */
- void setSubstitute(SkPDFObject* original, SkPDFObject* substitute);
-
- /** Find and return any substitute object set for the passed object. If
- * there is none, return the passed object.
- */
- SkPDFObject* getSubstituteObject(SkPDFObject* object) const;
-
- const SkTDArray<SkPDFObject*>& objects() const { return fObjects; }
-
-private:
- SkTDArray<SkPDFObject*> fObjects;
- SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers;
- SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap;
-};
-
-#endif
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFCatalog.cpp » ('j') | src/pdf/SkPDFStream.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698