From 022da0014faa103901ec107ed6a33e5ab00c7931 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 1 Oct 2015 13:49:28 -0700 Subject: Clean up some image decoder classes: - Use std::vector instead of raw uint8_t* - Make ICodec_ScanlineDecoder::GetScanline() return const uint8_t* - Add FxFreeDeleter, use it in CCodec_ImageDataCache. - Make CCodec_ImageDataCache encapsulate its data members. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1361053002 . --- core/include/fxcrt/fx_basic.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/include/fxcrt/fx_basic.h') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 3e556f5439..7412b8db3c 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -947,6 +947,10 @@ class CFX_AutoRestorer { T m_OldValue; }; +struct FxFreeDeleter { + inline void operator()(void* ptr) const { FX_Free(ptr); } +}; + // Used with nonstd::unique_ptr to Release() objects that can't be deleted. template struct ReleaseDeleter { -- cgit v1.2.3