blob: 8c007b567f13cc0299318ef27c15c3a4f4a50375 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// Copyright 2014 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Lei Zhanga6d9f0e2015-06-13 00:48:38 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Tom Sepez19922bb2015-05-28 13:23:12 -07007#ifndef FPDFSDK_INCLUDE_FSDK_RENDERCONTEXT_H_
8#define FPDFSDK_INCLUDE_FSDK_RENDERCONTEXT_H_
Tom Sepez1ed8a212015-05-11 15:25:39 -07009
Tom Sepez04db6532015-05-27 16:24:18 -070010#include "fsdk_define.h"
Lei Zhangb4e7f302015-11-06 15:52:32 -080011#include "public/fpdf_progressive.h"
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070012
13// Everything about rendering is put here: for OOM recovery
Nico Weber9d8ec5a2015-08-04 13:00:21 -070014class CRenderContext {
15 public:
16 CRenderContext() { Clear(); }
17 ~CRenderContext();
Lei Zhanga6d9f0e2015-06-13 00:48:38 -070018
Nico Weber9d8ec5a2015-08-04 13:00:21 -070019 void Clear();
Lei Zhanga6d9f0e2015-06-13 00:48:38 -070020
Nico Weber9d8ec5a2015-08-04 13:00:21 -070021 CFX_RenderDevice* m_pDevice;
22 CPDF_RenderContext* m_pContext;
23 CPDF_ProgressiveRenderer* m_pRenderer;
24 CPDF_AnnotList* m_pAnnots;
25 CPDF_RenderOptions* m_pOptions;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070026#ifdef _WIN32_WCE
Nico Weber9d8ec5a2015-08-04 13:00:21 -070027 CFX_DIBitmap* m_pBitmap;
28 HBITMAP m_hBitmap;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070029#endif
30};
31
Nico Weber9d8ec5a2015-08-04 13:00:21 -070032class IFSDK_PAUSE_Adapter : public IFX_Pause {
33 public:
Lei Zhang2b1a2d52015-08-14 22:16:22 -070034 explicit IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause);
35 ~IFSDK_PAUSE_Adapter() override;
36
37 FX_BOOL NeedToPauseNow() override;
Lei Zhanga6d9f0e2015-06-13 00:48:38 -070038
Nico Weber9d8ec5a2015-08-04 13:00:21 -070039 private:
40 IFSDK_PAUSE* m_IPause;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070041};
Tom Sepez04db6532015-05-27 16:24:18 -070042
Tom Sepez19922bb2015-05-28 13:23:12 -070043#endif // FPDFSDK_INCLUDE_FSDK_RENDERCONTEXT_H_