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

Unified Diff: core/include/fpdfapi/fpdf_page.h

Issue 1700183002: Remove CFX_PtrList from renderer main loop. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 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 | « no previous file | core/include/fpdfapi/fpdf_render.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_page.h
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index fb951280a27e134e61adc822f4b7011c4a3048b3..3d98e3457864084ff7e7538eed36666411785fd2 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -7,6 +7,7 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_
+#include <list>
#include <memory>
#include "core/include/fpdfapi/fpdf_parser.h"
@@ -27,33 +28,15 @@ class CPDF_StreamContentParser;
#define PDFTRANS_ISOLATED 0x0200
#define PDFTRANS_KNOCKOUT 0x0400
-class CPDF_PageObjectList : public CFX_PtrList {
+class CPDF_PageObjectList : public std::list<std::unique_ptr<CPDF_PageObject>> {
public:
- explicit CPDF_PageObjectList(int nBlockSize) : CFX_PtrList(nBlockSize) {}
-
- CPDF_PageObject* GetNextObject(FX_POSITION& pos) const {
- return static_cast<CPDF_PageObject*>(GetNext(pos));
- }
-
- CPDF_PageObject* GetPrevObject(FX_POSITION& pos) const {
- return static_cast<CPDF_PageObject*>(GetPrev(pos));
- }
-
- CPDF_PageObject* GetObjectAt(FX_POSITION pos) const {
- return static_cast<CPDF_PageObject*>(GetAt(pos));
- }
-
// Linear complexity, to be avoided except as needed by public APIs.
- CPDF_PageObject* GetObjectByIndex(int index) const;
-
- FX_POSITION InsertObject(FX_POSITION posInsertAfter,
- CPDF_PageObject* pNewObject);
+ CPDF_PageObject* GetPageObjectByIndex(int index);
};
class CPDF_PageObjectHolder {
public:
CPDF_PageObjectHolder();
- ~CPDF_PageObjectHolder();
void ContinueParse(IFX_Pause* pPause);
FX_BOOL IsParsed() const { return m_ParseState == CONTENT_PARSED; }
@@ -165,8 +148,8 @@ class CPDF_Form : public CPDF_PageObjectHolder {
};
class CPDF_PageContentGenerator {
public:
- CPDF_PageContentGenerator(CPDF_Page* pPage);
- ~CPDF_PageContentGenerator();
+ explicit CPDF_PageContentGenerator(CPDF_Page* pPage);
+
FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject);
void GenerateContent();
void TransformContent(CFX_Matrix& matrix);
« no previous file with comments | « no previous file | core/include/fpdfapi/fpdf_render.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698