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

Unified Diff: core/fxcodec/codec/fx_codec_tiff.cpp

Issue 1876023003: Remove ICodec_* Interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/fxcodec/codec/fx_codec_progress.cpp ('k') | core/fxcodec/codec/include/ccodec_progressivedecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/fx_codec_tiff.cpp
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index f0f2ab2e9608a64ce7e49daba0257ce7e29709c7..d4dc13926559c9a283a7a6f169db76929de25382 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -512,33 +512,35 @@ FX_BOOL CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap) {
}
return FALSE;
}
-void* CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr) {
+
+CCodec_TiffContext* CCodec_TiffModule::CreateDecoder(IFX_FileRead* file_ptr) {
CCodec_TiffContext* pDecoder = new CCodec_TiffContext;
if (!pDecoder->InitDecoder(file_ptr)) {
delete pDecoder;
- return NULL;
+ return nullptr;
}
return pDecoder;
}
-void CCodec_TiffModule::GetFrames(void* ctx, int32_t& frames) {
- CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
- pDecoder->GetFrames(frames);
+
+void CCodec_TiffModule::GetFrames(CCodec_TiffContext* ctx, int32_t& frames) {
+ ctx->GetFrames(frames);
}
-FX_BOOL CCodec_TiffModule::LoadFrameInfo(void* ctx,
+
+FX_BOOL CCodec_TiffModule::LoadFrameInfo(CCodec_TiffContext* ctx,
int32_t frame,
uint32_t& width,
uint32_t& height,
uint32_t& comps,
uint32_t& bpc,
CFX_DIBAttribute* pAttribute) {
- CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
- return pDecoder->LoadFrameInfo(frame, width, height, comps, bpc, pAttribute);
+ return ctx->LoadFrameInfo(frame, width, height, comps, bpc, pAttribute);
}
-FX_BOOL CCodec_TiffModule::Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) {
- CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
- return pDecoder->Decode(pDIBitmap);
+
+FX_BOOL CCodec_TiffModule::Decode(CCodec_TiffContext* ctx,
+ class CFX_DIBitmap* pDIBitmap) {
+ return ctx->Decode(pDIBitmap);
}
-void CCodec_TiffModule::DestroyDecoder(void* ctx) {
- CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx;
- delete pDecoder;
+
+void CCodec_TiffModule::DestroyDecoder(CCodec_TiffContext* ctx) {
+ delete ctx;
}
« no previous file with comments | « core/fxcodec/codec/fx_codec_progress.cpp ('k') | core/fxcodec/codec/include/ccodec_progressivedecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698