Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_progressiverenderer.h
Go to the documentation of this file.
1
// Copyright 2016 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FPDFAPI_RENDER_CPDF_PROGRESSIVERENDERER_H_
8
#
define
CORE_FPDFAPI_RENDER_CPDF_PROGRESSIVERENDERER_H_
9
10
#
include
<
stdint
.
h
>
11
12
#
include
<
memory
>
13
14
#
include
"core/fpdfapi/page/cpdf_pageobjectholder.h"
15
#
include
"core/fpdfapi/render/cpdf_rendercontext.h"
16
#
include
"core/fxcrt/fx_coordinates.h"
17
#
include
"core/fxcrt/unowned_ptr.h"
18
19
class
CPDF_RenderOptions
;
20
class
CPDF_RenderStatus
;
21
class
CFX_RenderDevice
;
22
class
PauseIndicatorIface
;
23
24
class
CPDF_ProgressiveRenderer
{
25
public
:
26
// Must match FDF_RENDER_* definitions in public/fpdf_progressive.h, but
27
// cannot #include that header. fpdfsdk/fpdf_progressive.cpp has
28
// static_asserts to make sure the two sets of values match.
29
enum
Status
{
30
kReady
,
// FPDF_RENDER_READY
31
kToBeContinued
,
// FPDF_RENDER_TOBECONTINUED
32
kDone
,
// FPDF_RENDER_DONE
33
kFailed
// FPDF_RENDER_FAILED
34
};
35
36
CPDF_ProgressiveRenderer
(
CPDF_RenderContext
* pContext,
37
CFX_RenderDevice
* pDevice,
38
const
CPDF_RenderOptions
* pOptions);
39
~
CPDF_ProgressiveRenderer
();
40
41
Status
GetStatus
()
const
{
return
m_Status; }
42
void
Start
(
PauseIndicatorIface
* pPause);
43
void
Continue
(
PauseIndicatorIface
* pPause);
44
45
private
:
46
// Maximum page objects to render before checking for pause.
47
static
constexpr
int
kStepLimit = 100;
48
49
Status
m_Status =
kReady
;
50
UnownedPtr
<
CPDF_RenderContext
>
const
m_pContext;
51
UnownedPtr
<
CFX_RenderDevice
>
const
m_pDevice;
52
UnownedPtr
<
const
CPDF_RenderOptions
>
const
m_pOptions;
53
std::unique_ptr<CPDF_RenderStatus> m_pRenderStatus;
54
CFX_FloatRect
m_ClipRect;
55
uint32_t m_LayerIndex = 0;
56
UnownedPtr
<
CPDF_RenderContext
::
Layer
> m_pCurrentLayer;
57
CPDF_PageObjectHolder::const_iterator m_LastObjectRendered;
58
};
59
60
#
endif
// CORE_FPDFAPI_RENDER_CPDF_PROGRESSIVERENDERER_H_
CFX_FloatRect
Definition
fx_coordinates.h:189
CFX_RenderDevice
Definition
cfx_renderdevice.h:39
CPDF_PageRenderContext::AnnotListIface
Definition
cpdf_pagerendercontext.h:23
CPDF_PageRenderContext::AnnotListIface::~AnnotListIface
virtual ~AnnotListIface()=default
CPDF_PageRenderContext::CPDF_PageRenderContext
CPDF_PageRenderContext()
CPDF_PageRenderContext::m_pContext
std::unique_ptr< CPDF_RenderContext > m_pContext
Definition
cpdf_pagerendercontext.h:35
CPDF_PageRenderContext::m_pOptions
std::unique_ptr< CPDF_RenderOptions > m_pOptions
Definition
cpdf_pagerendercontext.h:33
CPDF_PageRenderContext::m_pAnnots
std::unique_ptr< AnnotListIface > m_pAnnots
Definition
cpdf_pagerendercontext.h:32
CPDF_PageRenderContext::~CPDF_PageRenderContext
~CPDF_PageRenderContext() override
CPDF_PageRenderContext::m_pDevice
std::unique_ptr< CFX_RenderDevice > m_pDevice
Definition
cpdf_pagerendercontext.h:34
CPDF_PageRenderContext::m_pRenderer
std::unique_ptr< CPDF_ProgressiveRenderer > m_pRenderer
Definition
cpdf_pagerendercontext.h:36
CPDF_Page::RenderContextIface
Definition
cpdf_page.h:37
CPDF_ProgressiveRenderer
Definition
cpdf_progressiverenderer.h:24
CPDF_ProgressiveRenderer::GetStatus
Status GetStatus() const
Definition
cpdf_progressiverenderer.h:41
CPDF_ProgressiveRenderer::Status
Status
Definition
cpdf_progressiverenderer.h:29
CPDF_ProgressiveRenderer::kDone
@ kDone
Definition
cpdf_progressiverenderer.h:32
CPDF_ProgressiveRenderer::kToBeContinued
@ kToBeContinued
Definition
cpdf_progressiverenderer.h:31
CPDF_ProgressiveRenderer::kFailed
@ kFailed
Definition
cpdf_progressiverenderer.h:33
CPDF_ProgressiveRenderer::kReady
@ kReady
Definition
cpdf_progressiverenderer.h:30
CPDF_ProgressiveRenderer::Start
void Start(PauseIndicatorIface *pPause)
Definition
cpdf_progressiverenderer.cpp:32
CPDF_ProgressiveRenderer::Continue
void Continue(PauseIndicatorIface *pPause)
Definition
cpdf_progressiverenderer.cpp:41
CPDF_ProgressiveRenderer::CPDF_ProgressiveRenderer
CPDF_ProgressiveRenderer(CPDF_RenderContext *pContext, CFX_RenderDevice *pDevice, const CPDF_RenderOptions *pOptions)
Definition
cpdf_progressiverenderer.cpp:19
CPDF_ProgressiveRenderer::~CPDF_ProgressiveRenderer
~CPDF_ProgressiveRenderer()
Definition
cpdf_progressiverenderer.cpp:25
CPDF_RenderContext::Layer
Definition
cpdf_rendercontext.h:28
CPDF_RenderContext
Definition
cpdf_rendercontext.h:26
CPDF_RenderOptions
Definition
cpdf_renderoptions.h:19
CPDF_RenderStatus
Definition
cpdf_renderstatus.h:45
PauseIndicatorIface
Definition
pauseindicator_iface.h:10
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
render
cpdf_progressiverenderer.h
Generated on Thu Nov 14 2024 00:56:53 for Qt by
1.12.0