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

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

Issue 1089823004: Replace FX_NEW with new, remove tests from fpdfsdk (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebased Created 5 years, 8 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 "../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 11 matching lines...) Expand all
22 if (bitmap == NULL || page == NULL) 22 if (bitmap == NULL || page == NULL)
23 return FPDF_RENDER_FAILED; 23 return FPDF_RENDER_FAILED;
24 24
25 if (!pause) 25 if (!pause)
26 return FPDF_RENDER_FAILED; 26 return FPDF_RENDER_FAILED;
27 27
28 if (pause->version !=1) 28 if (pause->version !=1)
29 return FPDF_RENDER_FAILED; 29 return FPDF_RENDER_FAILED;
30 30
31 CPDF_Page* pPage = (CPDF_Page*)page; 31 CPDF_Page* pPage = (CPDF_Page*)page;
32 » 32 » CRenderContext* pContext = new CRenderContext;
33 //» FXMT_CSLOCK_OBJ(&pPage->m_PageLock); 33 » pPage->SetPrivateData((void*)1, pContext, DropContext);
34 »
35 » CRenderContext* pContext = FX_NEW CRenderContext;
36 » pPage->SetPrivateData((void*)1, pContext, DropContext );
37 #ifdef _SKIA_SUPPORT_ 34 #ifdef _SKIA_SUPPORT_
38 » pContext->m_pDevice = FX_NEW CFX_SkiaDevice; 35 » pContext->m_pDevice = new CFX_SkiaDevice;
39 if (flags & FPDF_REVERSE_BYTE_ORDER) 36 if (flags & FPDF_REVERSE_BYTE_ORDER)
40 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE); 37 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE);
41 else 38 else
42 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap); 39 ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap);
43 #else 40 #else
44 » pContext->m_pDevice = FX_NEW CFX_FxgeDevice; 41 » pContext->m_pDevice = new CFX_FxgeDevice;
45 if (flags & FPDF_REVERSE_BYTE_ORDER) 42 if (flags & FPDF_REVERSE_BYTE_ORDER)
46 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE); 43 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap,0,TRUE);
47 else 44 else
48 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap); 45 ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bi tmap);
49 #endif 46 #endif
50 IFSDK_PAUSE_Adapter IPauseAdapter(pause); 47 IFSDK_PAUSE_Adapter IPauseAdapter(pause);
51 48
52 Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate , flags,FALSE, &IPauseAdapter); 49 Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate , flags,FALSE, &IPauseAdapter);
53 50
54 if ( pContext->m_pRenderer ) 51 if ( pContext->m_pRenderer )
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 95
99 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void *)1); 96 CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void *)1);
100 if (pContext) 97 if (pContext)
101 { 98 {
102 pContext->m_pDevice->RestoreState(); 99 pContext->m_pDevice->RestoreState();
103 delete pContext; 100 delete pContext;
104 pPage->RemovePrivateData((void*)1); 101 pPage->RemovePrivateData((void*)1);
105 } 102 }
106 } 103 }
107 104
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