diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-18 14:53:31 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-18 14:53:31 -0800 |
commit | 0fa6fee0e48af8681f0cd50f6a9471ecc0a46c11 (patch) | |
tree | 6e8b93a1103b71c3b83e35bc7308658521b49bde /core/src/fpdfapi/fpdf_render/render_int.h | |
parent | e6ca18ad72a1555e89dc37117c5be220631c5e0c (diff) | |
download | pdfium-0fa6fee0e48af8681f0cd50f6a9471ecc0a46c11.tar.xz |
Remove CFX_MapPtrToPtr in CFX_PageRenderCache
Rename CPDF_ImageCache to CPDF_ImageCacheEntry because it
represents a single entry, not the entire cache itself.
Delete unused ClearRenderCache method, and merge cache entry
clear() into its dtor.
Fix a broken size calculation.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1539983002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_render/render_int.h')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/render_int.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index c4bfa28ff7..80cf6ca9ff 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -14,7 +14,7 @@ #include "third_party/base/nonstd_unique_ptr.h" class CFX_GlyphBitmap; -class CPDF_ImageCache; +class CPDF_ImageCacheEntry; class ICodec_ScanlineDecoder; #define TYPE3_MAX_BLUES 16 @@ -186,7 +186,7 @@ class CPDF_RenderStatus { FX_ARGB fill_argb, int bitmap_alpha, const CFX_Matrix* pImage2Device, - CPDF_ImageCache* pImageCache, + CPDF_ImageCacheEntry* pImageCache, FX_DWORD flags); void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int left, @@ -424,10 +424,10 @@ class CPDF_DeviceBuffer { CFX_Matrix m_Matrix; }; -class CPDF_ImageCache { +class CPDF_ImageCacheEntry { public: - CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream); - ~CPDF_ImageCache(); + CPDF_ImageCacheEntry(CPDF_Document* pDoc, CPDF_Stream* pStream); + ~CPDF_ImageCacheEntry(); void ClearImageData(); void Reset(const CFX_DIBitmap* pBitmap); FX_BOOL GetCachedBitmap(CFX_DIBSource*& pBitmap, @@ -456,7 +456,6 @@ class CPDF_ImageCache { int32_t downsampleWidth = 0, int32_t downsampleHeight = 0); int Continue(IFX_Pause* pPause); - int ContinueGetCachedBitmap(); CFX_DIBSource* DetachBitmap(); CFX_DIBSource* DetachMask(); CFX_DIBSource* m_pCurBitmap; @@ -465,6 +464,8 @@ class CPDF_ImageCache { CPDF_RenderStatus* m_pRenderStatus; protected: + void ContinueGetCachedBitmap(); + CPDF_Document* m_pDocument; CPDF_Stream* m_pStream; CFX_DIBSource* m_pCachedBitmap; |