diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-04-03 16:32:19 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-03 16:32:19 +0000 |
commit | 232b918d1f0faec230652f4097b834257a7dbb27 (patch) | |
tree | c13213ab3d70cc147a6ea59b0f090a51beecae8f /core/fpdfapi/page | |
parent | 36d7ad4a24287b562e1d88fcde635e36a167bfe3 (diff) | |
download | pdfium-232b918d1f0faec230652f4097b834257a7dbb27.tar.xz |
Re-arrange so inline vectors come last in structs.
This might make the memory tools more effective in finding OOBs.
Change-Id: Id093bb0a88c37954c80d612ac00b5a168e75bdbf
Reviewed-on: https://pdfium-review.googlesource.com/29550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r-- | core/fpdfapi/page/cpdf_colorspace.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_meshstream.h | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_psengine.h | 3 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.h | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp index fde0ed4dad..e1dd598a63 100644 --- a/core/fpdfapi/page/cpdf_colorspace.cpp +++ b/core/fpdfapi/page/cpdf_colorspace.cpp @@ -89,9 +89,9 @@ class CPDF_CalGray : public CPDF_ColorSpace { bool bTransMask) const override; private: + float m_Gamma; float m_WhitePoint[3]; float m_BlackPoint[3]; - float m_Gamma; }; class CPDF_CalRGB : public CPDF_ColorSpace { @@ -112,12 +112,12 @@ class CPDF_CalRGB : public CPDF_ColorSpace { int image_height, bool bTransMask) const override; + bool m_bGamma; + bool m_bMatrix; float m_WhitePoint[3]; float m_BlackPoint[3]; float m_Gamma[3]; float m_Matrix[9]; - bool m_bGamma; - bool m_bMatrix; }; class CPDF_LabCS : public CPDF_ColorSpace { diff --git a/core/fpdfapi/page/cpdf_meshstream.h b/core/fpdfapi/page/cpdf_meshstream.h index 7c34b25185..9c97e09c15 100644 --- a/core/fpdfapi/page/cpdf_meshstream.h +++ b/core/fpdfapi/page/cpdf_meshstream.h @@ -78,10 +78,10 @@ class CPDF_MeshStream { float m_xmax; float m_ymin; float m_ymax; - float m_ColorMin[kMaxComponents]; - float m_ColorMax[kMaxComponents]; RetainPtr<CPDF_StreamAcc> m_pStream; std::unique_ptr<CFX_BitStream> m_BitStream; + float m_ColorMin[kMaxComponents]; + float m_ColorMax[kMaxComponents]; }; #endif // CORE_FPDFAPI_PAGE_CPDF_MESHSTREAM_H_ diff --git a/core/fpdfapi/page/cpdf_psengine.h b/core/fpdfapi/page/cpdf_psengine.h index 8a054cc9e6..042a1c0895 100644 --- a/core/fpdfapi/page/cpdf_psengine.h +++ b/core/fpdfapi/page/cpdf_psengine.h @@ -120,9 +120,10 @@ class CPDF_PSEngine { private: static constexpr uint32_t kPSEngineStackSize = 100; - float m_Stack[kPSEngineStackSize]; + uint32_t m_StackCount; CPDF_PSProc m_MainProc; + float m_Stack[kPSEngineStackSize]; }; #endif // CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h index de4a92fc99..5dcfbe5308 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.h +++ b/core/fpdfapi/page/cpdf_streamcontentparser.h @@ -201,7 +201,6 @@ class CPDF_StreamContentParser { UnownedPtr<std::set<const uint8_t*>> const m_ParsedSet; CFX_Matrix m_mtContentToUser; const CFX_FloatRect m_BBox; - ContentParam m_ParamBuf[kParamBufSize]; uint32_t m_ParamStartPos; uint32_t m_ParamCount; CPDF_StreamParser* m_pSyntax; @@ -219,9 +218,10 @@ class CPDF_StreamContentParser { ByteString m_LastImageName; RetainPtr<CPDF_Image> m_pLastImage; bool m_bColored; - float m_Type3Data[6]; bool m_bResourceMissing; std::vector<std::unique_ptr<CPDF_AllStates>> m_StateStack; + float m_Type3Data[6]; + ContentParam m_ParamBuf[kParamBufSize]; }; #endif // CORE_FPDFAPI_PAGE_CPDF_STREAMCONTENTPARSER_H_ |