summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-24 10:19:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-24 10:19:11 -0700
commitad2441ef675866eb84c7392eeda03391a5a5d474 (patch)
tree5b250139c65d5f440f3b544643b1fb85e23380dd /core/fxcodec/codec
parentb674ebe6dd13288160ad8e324d719a124caf5a83 (diff)
downloadpdfium-ad2441ef675866eb84c7392eeda03391a5a5d474.tar.xz
Rename IFX_ stream nameschromium/2900
It's been troubling for some time that an IFX_FileStream might actually be an in-memory buffer with no backing file. Review-Url: https://codereview.chromium.org/2443723002
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/ccodec_progressivedecoder.h6
-rw-r--r--core/fxcodec/codec/ccodec_tiffmodule.h4
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_tiff.cpp11
4 files changed, 12 insertions, 11 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h
index 73fec6457e..b760c2ec1c 100644
--- a/core/fxcodec/codec/ccodec_progressivedecoder.h
+++ b/core/fxcodec/codec/ccodec_progressivedecoder.h
@@ -21,7 +21,7 @@ class CCodec_ModuleMgr;
class CCodec_PngContext;
class CCodec_TiffContext;
class CFX_DIBAttribute;
-class IFX_FileRead;
+class IFX_SeekableReadStream;
class IFX_Pause;
struct FXBMP_Context;
struct FXGIF_Context;
@@ -45,7 +45,7 @@ class CCodec_ProgressiveDecoder {
explicit CCodec_ProgressiveDecoder(CCodec_ModuleMgr* pCodecMgr);
~CCodec_ProgressiveDecoder();
- FXCODEC_STATUS LoadImageInfo(IFX_FileRead* pFile,
+ FXCODEC_STATUS LoadImageInfo(IFX_SeekableReadStream* pFile,
FXCODEC_IMAGE_TYPE imageType,
CFX_DIBAttribute* pAttribute,
bool bSkipImageTypeCheck);
@@ -125,7 +125,7 @@ class CCodec_ProgressiveDecoder {
std::vector<uint8_t> m_pWeightTables;
};
- IFX_FileRead* m_pFile;
+ IFX_SeekableReadStream* m_pFile;
CCodec_ModuleMgr* m_pCodecMgr;
FXJPEG_Context* m_pJpegContext;
FXPNG_Context* m_pPngContext;
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.h b/core/fxcodec/codec/ccodec_tiffmodule.h
index c6525f32e2..37d40821a6 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.h
+++ b/core/fxcodec/codec/ccodec_tiffmodule.h
@@ -12,13 +12,13 @@
class CCodec_TiffContext;
class CFX_DIBAttribute;
class CFX_DIBitmap;
-class IFX_FileRead;
+class IFX_SeekableReadStream;
class CCodec_TiffModule {
public:
~CCodec_TiffModule() {}
- CCodec_TiffContext* CreateDecoder(IFX_FileRead* file_ptr);
+ CCodec_TiffContext* CreateDecoder(IFX_SeekableReadStream* file_ptr);
bool LoadFrameInfo(CCodec_TiffContext* ctx,
int32_t frame,
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index 605e1b573f..4de62baad2 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -1296,7 +1296,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(
}
FXCODEC_STATUS CCodec_ProgressiveDecoder::LoadImageInfo(
- IFX_FileRead* pFile,
+ IFX_SeekableReadStream* pFile,
FXCODEC_IMAGE_TYPE imageType,
CFX_DIBAttribute* pAttribute,
bool bSkipImageTypeCheck) {
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index f4fa01aabc..c76a604e4d 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -17,7 +17,7 @@ class CCodec_TiffContext {
CCodec_TiffContext();
~CCodec_TiffContext();
- bool InitDecoder(IFX_FileRead* file_ptr);
+ bool InitDecoder(IFX_SeekableReadStream* file_ptr);
bool LoadFrameInfo(int32_t frame,
int32_t* width,
int32_t* height,
@@ -26,7 +26,7 @@ class CCodec_TiffContext {
CFX_DIBAttribute* pAttribute);
bool Decode(CFX_DIBitmap* pDIBitmap);
- IFX_FileRead* io_in() const { return m_io_in; }
+ IFX_SeekableReadStream* io_in() const { return m_io_in; }
uint32_t offset() const { return m_offset; }
void set_offset(uint32_t offset) { m_offset = offset; }
void increment_offset(uint32_t offset) { m_offset += offset; }
@@ -50,7 +50,7 @@ class CCodec_TiffContext {
uint16_t bps,
uint16_t spp);
- IFX_FileRead* m_io_in;
+ IFX_SeekableReadStream* m_io_in;
uint32_t m_offset;
TIFF* m_tif_ctx;
};
@@ -193,7 +193,7 @@ CCodec_TiffContext::~CCodec_TiffContext() {
TIFFClose(m_tif_ctx);
}
-bool CCodec_TiffContext::InitDecoder(IFX_FileRead* file_ptr) {
+bool CCodec_TiffContext::InitDecoder(IFX_SeekableReadStream* file_ptr) {
m_io_in = file_ptr;
m_tif_ctx = tiff_open(this, "r");
return !!m_tif_ctx;
@@ -435,7 +435,8 @@ bool CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap) {
return false;
}
-CCodec_TiffContext* CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr) {
+CCodec_TiffContext* CCodec_TiffModule::CreateDecoder(
+ IFX_SeekableReadStream* file_ptr) {
CCodec_TiffContext* pDecoder = new CCodec_TiffContext;
if (!pDecoder->InitDecoder(file_ptr)) {
delete pDecoder;