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

Unified Diff: core/fxcodec/codec/ccodec_progressivedecoder.h

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)
Patch Set: Clean up cast expression Created 4 years 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/parser/fpdf_parser_utility.cpp ('k') | core/fxcodec/codec/ccodec_tiffmodule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/ccodec_progressivedecoder.h
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h
index de7542e485a4f92036bca82cd4ce87308c0e52e0..614146f79dd3296314e1d137f0a05626a824a793 100644
--- a/core/fxcodec/codec/ccodec_progressivedecoder.h
+++ b/core/fxcodec/codec/ccodec_progressivedecoder.h
@@ -10,6 +10,7 @@
#include <vector>
#include "core/fxcodec/fx_codec_def.h"
+#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxge/fx_dib.h"
@@ -45,10 +46,11 @@ class CCodec_ProgressiveDecoder {
explicit CCodec_ProgressiveDecoder(CCodec_ModuleMgr* pCodecMgr);
~CCodec_ProgressiveDecoder();
- FXCODEC_STATUS LoadImageInfo(IFX_SeekableReadStream* pFile,
- FXCODEC_IMAGE_TYPE imageType,
- CFX_DIBAttribute* pAttribute,
- bool bSkipImageTypeCheck);
+ FXCODEC_STATUS LoadImageInfo(
+ const CFX_RetainPtr<IFX_SeekableReadStream>& pFile,
+ FXCODEC_IMAGE_TYPE imageType,
+ CFX_DIBAttribute* pAttribute,
+ bool bSkipImageTypeCheck);
FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; }
int32_t GetWidth() const { return m_SrcWidth; }
@@ -125,7 +127,7 @@ class CCodec_ProgressiveDecoder {
std::vector<uint8_t> m_pWeightTables;
};
- IFX_SeekableReadStream* m_pFile;
+ CFX_RetainPtr<IFX_SeekableReadStream> m_pFile;
CCodec_ModuleMgr* m_pCodecMgr;
FXJPEG_Context* m_pJpegContext;
FXPNG_Context* m_pPngContext;
« no previous file with comments | « core/fpdfapi/parser/fpdf_parser_utility.cpp ('k') | core/fxcodec/codec/ccodec_tiffmodule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698