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

Unified Diff: core/include/fpdfapi/fpdf_render.h

Issue 1699443002: Rework progressive render loop. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove CPDF_RenderConfig. Created 4 years, 10 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/include/fpdfapi/fpdf_module.h ('k') | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_render.h
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index 2637dd3252aa3256bc007e4a2de40840953cc178..ec5d1519143330d0768947b9f98406325289d2a1 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -136,11 +136,13 @@ class CPDF_ProgressiveRenderer {
Status GetStatus() const { return m_Status; }
void Start(IFX_Pause* pPause);
void Continue(IFX_Pause* pPause);
- int EstimateProgress();
private:
void RenderStep();
+ // Maximum page objects to render before checking for pause.
+ static const int kStepLimit = 100;
+
Status m_Status;
CPDF_RenderContext* const m_pContext;
CFX_RenderDevice* const m_pDevice;
@@ -148,9 +150,8 @@ class CPDF_ProgressiveRenderer {
std::unique_ptr<CPDF_RenderStatus> m_pRenderStatus;
CFX_FloatRect m_ClipRect;
FX_DWORD m_LayerIndex;
- FX_DWORD m_ObjectIndex;
- FX_POSITION m_ObjectPos;
- FX_POSITION m_PrevLastPos;
+ CPDF_RenderContext::Layer* m_pCurrentLayer;
+ FX_POSITION m_LastObjectRendered;
};
class CPDF_TextRenderer {
@@ -261,13 +262,6 @@ class CPDF_PageRenderCache {
FX_DWORD m_nCacheSize;
FX_BOOL m_bCurFindCache;
};
-class CPDF_RenderConfig {
- public:
- CPDF_RenderConfig();
- ~CPDF_RenderConfig();
- int m_HalftoneLimit;
- int m_RenderStepLimit;
-};
FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix);
« no previous file with comments | « core/include/fpdfapi/fpdf_module.h ('k') | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698