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

Side by Side Diff: fpdfsdk/src/fpdf_progressive.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdf_sysfontinfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "../../public/fpdf_progressive.h" 7 #include "../../public/fpdf_progressive.h"
8 #include "../../public/fpdfview.h" 8 #include "../../public/fpdfview.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 #include "../include/fsdk_rendercontext.h" 10 #include "../include/fsdk_rendercontext.h"
(...skipping 11 matching lines...) Expand all
22 22
23 if (pause->version !=1) 23 if (pause->version !=1)
24 return FPDF_RENDER_FAILED; 24 return FPDF_RENDER_FAILED;
25 25
26 CPDF_Page* pPage = (CPDF_Page*)page; 26 CPDF_Page* pPage = (CPDF_Page*)page;
27 CRenderContext* pContext = new CRenderContext; 27 CRenderContext* pContext = new CRenderContext;
28 pPage->SetPrivateData((void*)1, pContext, DropContext); 28 pPage->SetPrivateData((void*)1, pContext, DropContext);
29 #ifdef _SKIA_SUPPORT_ 29 #ifdef _SKIA_SUPPORT_
30 pContext->m_pDevice = new CFX_SkiaDevice; 30 pContext->m_pDevice = new CFX_SkiaDevice;
31 if (flags & FPDF_REVERSE_BYTE_ORDER) 31 if (flags & FPDF_REVERSE_BYTE_ORDER)
32 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,T RUE); 32 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,t rue);
33 else 33 else
34 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap); 34 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
35 #else 35 #else
36 pContext->m_pDevice = new CFX_FxgeDevice; 36 pContext->m_pDevice = new CFX_FxgeDevice;
37 if (flags & FPDF_REVERSE_BYTE_ORDER) 37 if (flags & FPDF_REVERSE_BYTE_ORDER)
38 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,T RUE); 38 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,t rue);
39 else 39 else
40 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap); 40 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
41 #endif 41 #endif
42 IFSDK_PAUSE_Adapter IPauseAdapter(pause); 42 IFSDK_PAUSE_Adapter IPauseAdapter(pause);
43 43
44 FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y, 44 FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
45 rotate, flags,FALSE, &IPauseAdapter); 45 rotate, flags,false, &IPauseAdapter);
46 46
47 if (pContext->m_pRenderer) 47 if (pContext->m_pRenderer)
48 return CPDF_ProgressiveRenderer::ToFPDFStatus(pContext->m_pRenderer->Get Status()); 48 return CPDF_ProgressiveRenderer::ToFPDFStatus(pContext->m_pRenderer->Get Status());
49 49
50 return FPDF_RENDER_FAILED; 50 return FPDF_RENDER_FAILED;
51 } 51 }
52 52
53 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus e) 53 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus e)
54 { 54 {
55 if (page == NULL) 55 if (page == NULL)
(...skipping 25 matching lines...) Expand all
81 CPDF_Page* pPage = (CPDF_Page*)page; 81 CPDF_Page* pPage = (CPDF_Page*)page;
82 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void*)1) ; 82 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void*)1) ;
83 if (!pContext) 83 if (!pContext)
84 return; 84 return;
85 85
86 pContext->m_pDevice->RestoreState(); 86 pContext->m_pDevice->RestoreState();
87 delete pContext; 87 delete pContext;
88 pPage->RemovePrivateData((void*)1); 88 pPage->RemovePrivateData((void*)1);
89 } 89 }
90 90
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdf_sysfontinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698