OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../include/fpdf_progressive.h" | 7 #include "../include/fpdf_progressive.h" |
8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 #include "../include/fpdfview.h" | 9 #include "../include/fpdfview.h" |
10 #include "../include/fsdk_rendercontext.h" | 10 #include "../include/fsdk_rendercontext.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap); | 42 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap); |
43 #else | 43 #else |
44 pContext->m_pDevice = FX_NEW CFX_FxgeDevice; | 44 pContext->m_pDevice = FX_NEW CFX_FxgeDevice; |
45 if (flags & FPDF_REVERSE_BYTE_ORDER) | 45 if (flags & FPDF_REVERSE_BYTE_ORDER) |
46 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap,0,TRUE); | 46 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap,0,TRUE); |
47 else | 47 else |
48 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap); | 48 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi
tmap); |
49 #endif | 49 #endif |
50 IFSDK_PAUSE_Adapter IPauseAdapter(pause); | 50 IFSDK_PAUSE_Adapter IPauseAdapter(pause); |
51 | 51 |
52 » if (flags & FPDF_NO_CATCH) | 52 » Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate
, flags,FALSE, &IPauseAdapter); |
53 » » Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y
, rotate, flags,FALSE, &IPauseAdapter); | |
54 » else { | |
55 » » try { | |
56 » » » Func_RenderPage(pContext, page, start_x, start_y, size_x
, size_y, rotate, flags,FALSE, &IPauseAdapter); | |
57 » » » } | |
58 » » catch (...){} | |
59 » } | |
60 | 53 |
61 if ( pContext->m_pRenderer ) | 54 if ( pContext->m_pRenderer ) |
62 { | 55 { |
63 CPDF_ProgressiveRenderer::RenderStatus status = CPDF_Progressive
Renderer::Failed; | 56 CPDF_ProgressiveRenderer::RenderStatus status = CPDF_Progressive
Renderer::Failed; |
64 status = pContext->m_pRenderer->GetStatus(); | 57 status = pContext->m_pRenderer->GetStatus(); |
65 return status; | 58 return status; |
66 } | 59 } |
67 return FPDF_RENDER_FAILED; | 60 return FPDF_RENDER_FAILED; |
68 } | 61 } |
69 | 62 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 98 |
106 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void
*)1); | 99 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void
*)1); |
107 if (pContext) | 100 if (pContext) |
108 { | 101 { |
109 pContext->m_pDevice->RestoreState(); | 102 pContext->m_pDevice->RestoreState(); |
110 delete pContext; | 103 delete pContext; |
111 pPage->RemovePrivateData((void*)1); | 104 pPage->RemovePrivateData((void*)1); |
112 } | 105 } |
113 } | 106 } |
114 | 107 |
OLD | NEW |