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

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

Issue 2345063002: Use string pools in some dictionaries (Closed)
Patch Set: Remove default ctor Created 4 years, 3 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: core/fpdfapi/fpdf_page/pageint.h
diff --git a/core/fpdfapi/fpdf_page/pageint.h b/core/fpdfapi/fpdf_page/pageint.h
index 427a363e8eb8c77e2e3bad046203158cb4dc1367..75486a454929286a4d30020d195afd4189774fc7 100644
--- a/core/fpdfapi/fpdf_page/pageint.h
+++ b/core/fpdfapi/fpdf_page/pageint.h
@@ -16,6 +16,7 @@
#include "core/fpdfapi/fpdf_page/cpdf_contentmark.h"
#include "core/fpdfapi/fpdf_page/cpdf_countedobject.h"
#include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h"
+#include "core/fxcrt/include/cfx_string_pool_template.h"
#include "core/fxge/include/cfx_pathdata.h"
#include "core/fxge/include/cfx_renderdevice.h"
@@ -43,6 +44,9 @@ class CPDF_StreamParser {
enum SyntaxType { EndOfData, Number, Keyword, Name, Others };
CPDF_StreamParser(const uint8_t* pData, uint32_t dwSize);
+ CPDF_StreamParser(const uint8_t* pData,
+ uint32_t dwSize,
+ CFX_ByteStringPool* pPool);
~CPDF_StreamParser();
CPDF_Stream* ReadInlineStream(CPDF_Document* pDoc,
@@ -66,17 +70,14 @@ class CPDF_StreamParser {
void GetNextWord(FX_BOOL& bIsNumber);
CFX_ByteString ReadString();
CFX_ByteString ReadHexString();
- const uint8_t* m_pBuf;
-
- // Length in bytes of m_pBuf.
- uint32_t m_Size;
-
- // Current byte position within m_pBuf.
- uint32_t m_Pos;
+ const uint8_t* m_pBuf;
+ uint32_t m_Size; // Length in bytes of m_pBuf.
+ uint32_t m_Pos; // Current byte position within m_pBuf.
uint8_t m_WordBuffer[256];
uint32_t m_WordSize;
CPDF_Object* m_pLastObj;
+ CFX_ByteStringPool* const m_pPool;
private:
bool PositionIsInBounds() const;

Powered by Google App Engine
This is Rietveld 408576698