diff options
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Image.h')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Image.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h index 1f418fb7e2..c0980407db 100644 --- a/core/fxcodec/jbig2/JBig2_Image.h +++ b/core/fxcodec/jbig2/JBig2_Image.h @@ -10,6 +10,7 @@ #include <memory> #include "core/fxcodec/jbig2/JBig2_Define.h" +#include "core/fxcrt/maybe_owned.h" struct FX_RECT; @@ -31,6 +32,7 @@ class CJBig2_Image { int32_t width() const { return m_nWidth; } int32_t height() const { return m_nHeight; } int32_t stride() const { return m_nStride; } + uint8_t* data() const { return m_pData.Get(); } int getPixel(int32_t x, int32_t y) const; int32_t setPixel(int32_t x, int32_t y, int bVal); @@ -68,13 +70,12 @@ class CJBig2_Image { int32_t h); void expand(int32_t h, bool v); - uint8_t* m_pData; private: + MaybeOwned<uint8_t, FxFreeDeleter> m_pData; int32_t m_nWidth; // 1-bit pixels int32_t m_nHeight; // lines int32_t m_nStride; // bytes - bool m_bOwnsBuffer; }; #endif // CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |