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

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

Issue 2416733002: split CPDF_StreamContentParser::AddImage() into 3 overloads. (Closed)
Patch Set: Created 4 years, 2 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 | « core/fpdfapi/page/fpdf_page_parser.cpp ('k') | core/fpdfapi/parser/cpdf_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/page/pageint.h
diff --git a/core/fpdfapi/page/pageint.h b/core/fpdfapi/page/pageint.h
index 5f8351e26157f555d109cb48ab4117875e65e2d7..7ab9c6c8630409c25634a30ee293885a61b4c040 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();
« no previous file with comments | « core/fpdfapi/page/fpdf_page_parser.cpp ('k') | core/fpdfapi/parser/cpdf_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698