summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/pageint.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-13 09:42:30 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-13 09:42:30 -0700
commitd66f9d0b1fb0af57960f9c7163c475968505ee4a (patch)
treee3ddfa51c087bb7a6960f117f68a412b14b322d8 /core/fpdfapi/page/pageint.h
parent6e5239c6e3891d78e7b9e8262c23cd129f0cdbb7 (diff)
downloadpdfium-d66f9d0b1fb0af57960f9c7163c475968505ee4a.tar.xz
split CPDF_StreamContentParser::AddImage() into 3 overloads.
Small step before making CPDF_Image stream ownership saner. Review-Url: https://codereview.chromium.org/2416733002
Diffstat (limited to 'core/fpdfapi/page/pageint.h')
-rw-r--r--core/fpdfapi/page/pageint.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/fpdfapi/page/pageint.h b/core/fpdfapi/page/pageint.h
index 5f8351e261..7ab9c6c863 100644
--- a/core/fpdfapi/page/pageint.h
+++ b/core/fpdfapi/page/pageint.h
@@ -16,6 +16,7 @@
#include "core/fpdfapi/page/cpdf_contentmark.h"
#include "core/fpdfapi/page/cpdf_countedobject.h"
#include "core/fpdfapi/page/cpdf_pageobjectholder.h"
+#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fxcrt/cfx_string_pool_template.h"
#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxge/cfx_pathdata.h"
@@ -143,9 +144,10 @@ class CPDF_StreamContentParser {
void AddPathPoint(FX_FLOAT x, FX_FLOAT y, int flag);
void AddPathRect(FX_FLOAT x, FX_FLOAT y, FX_FLOAT w, FX_FLOAT h);
void AddPathObject(int FillType, bool bStroke);
- CPDF_ImageObject* AddImage(CPDF_Stream* pStream,
- CPDF_Image* pImage,
- bool bInline);
+ CPDF_ImageObject* AddImage(UniqueStream pStream);
+ CPDF_ImageObject* AddImage(uint32_t streamObjNum);
+ CPDF_ImageObject* AddImage(CPDF_Image* pImage);
+
void AddForm(CPDF_Stream* pStream);
void SetGraphicStates(CPDF_PageObject* pObj,
bool bColor,
@@ -162,6 +164,9 @@ class CPDF_StreamContentParser {
std::unordered_map<uint32_t, void (CPDF_StreamContentParser::*)()>;
static OpCodes InitializeOpCodes();
+ // Takes ownership of |pImageObj|, returns unowned pointer to it.
+ CPDF_ImageObject* AddImageObject(std::unique_ptr<CPDF_ImageObject> pImageObj);
+
void Handle_CloseFillStrokePath();
void Handle_FillStrokePath();
void Handle_CloseEOFillStrokePath();