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

Side by Side Diff: core/src/fxge/dib/dib_int.h

Issue 1297713003: Don't bother checking pointers before delete[] and FX_Free(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 4 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 | « core/src/fxge/android/fpf_skiafontmgr.h ('k') | core/src/fxge/dib/fx_dib_composite.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 #ifndef CORE_SRC_FXGE_DIB_DIB_INT_H_ 7 #ifndef CORE_SRC_FXGE_DIB_DIB_INT_H_
8 #define CORE_SRC_FXGE_DIB_DIB_INT_H_ 8 #define CORE_SRC_FXGE_DIB_DIB_INT_H_
9 9
10 class CPDF_FixedMatrix { 10 class CPDF_FixedMatrix {
(...skipping 17 matching lines...) Expand all
28 #define FPDF_HUGE_IMAGE_SIZE 60000000 28 #define FPDF_HUGE_IMAGE_SIZE 60000000
29 struct PixelWeight { 29 struct PixelWeight {
30 int m_SrcStart; 30 int m_SrcStart;
31 int m_SrcEnd; 31 int m_SrcEnd;
32 int m_Weights[1]; 32 int m_Weights[1];
33 }; 33 };
34 class CWeightTable { 34 class CWeightTable {
35 public: 35 public:
36 CWeightTable() { m_pWeightTables = NULL; } 36 CWeightTable() { m_pWeightTables = NULL; }
37 ~CWeightTable() { 37 ~CWeightTable() {
38 if (m_pWeightTables) { 38 FX_Free(m_pWeightTables);
39 FX_Free(m_pWeightTables);
40 }
41 m_pWeightTables = NULL; 39 m_pWeightTables = NULL;
42 } 40 }
43 void Calc(int dest_len, 41 void Calc(int dest_len,
44 int dest_min, 42 int dest_min,
45 int dest_max, 43 int dest_max,
46 int src_len, 44 int src_len,
47 int src_min, 45 int src_min,
48 int src_max, 46 int src_max,
49 int flags); 47 int flags);
50 PixelWeight* GetPixelWeight(int pixel) { 48 PixelWeight* GetPixelWeight(int pixel) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int m_Flags; 83 int m_Flags;
86 CWeightTable m_WeightTable; 84 CWeightTable m_WeightTable;
87 int m_CurRow; 85 int m_CurRow;
88 FX_BOOL StartStretchHorz(); 86 FX_BOOL StartStretchHorz();
89 FX_BOOL ContinueStretchHorz(IFX_Pause* pPause); 87 FX_BOOL ContinueStretchHorz(IFX_Pause* pPause);
90 void StretchVert(); 88 void StretchVert();
91 int m_State; 89 int m_State;
92 }; 90 };
93 91
94 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_ 92 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_
OLDNEW
« no previous file with comments | « core/src/fxge/android/fpf_skiafontmgr.h ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698