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

Side by Side Diff: core/src/fxcodec/codec/codec_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/fpdftext/fpdf_text.cpp ('k') | core/src/fxcodec/codec/fx_codec.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_FXCODEC_CODEC_CODEC_INT_H_ 7 #ifndef CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_
8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ 8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_
9 9
10 #include <limits.h> 10 #include <limits.h>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 FX_DWORD GetSrcOffset() override { return -1; } 47 FX_DWORD GetSrcOffset() override { return -1; }
48 void DownScale(int dest_width, int dest_height) override; 48 void DownScale(int dest_width, int dest_height) override;
49 uint8_t* GetScanline(int line) override; 49 uint8_t* GetScanline(int line) override;
50 FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) override; 50 FX_BOOL SkipToScanline(int line, IFX_Pause* pPause) override;
51 int GetWidth() override { return m_OutputWidth; } 51 int GetWidth() override { return m_OutputWidth; }
52 int GetHeight() override { return m_OutputHeight; } 52 int GetHeight() override { return m_OutputHeight; }
53 int CountComps() override { return m_nComps; } 53 int CountComps() override { return m_nComps; }
54 int GetBPC() override { return m_bpc; } 54 int GetBPC() override { return m_bpc; }
55 FX_BOOL IsColorTransformed() override { return m_bColorTransformed; } 55 FX_BOOL IsColorTransformed() override { return m_bColorTransformed; }
56 void ClearImageData() override { 56 void ClearImageData() override {
57 if (m_pDataCache) { 57 FX_Free(m_pDataCache);
58 FX_Free(m_pDataCache);
59 }
60 m_pDataCache = NULL; 58 m_pDataCache = NULL;
61 } 59 }
62 60
63 protected: 61 protected:
64 int m_OrigWidth; 62 int m_OrigWidth;
65 63
66 int m_OrigHeight; 64 int m_OrigHeight;
67 65
68 int m_DownScale; 66 int m_DownScale;
69 67
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, 362 OPJ_SIZE_T opj_read_from_memory(void* p_buffer,
365 OPJ_SIZE_T nb_bytes, 363 OPJ_SIZE_T nb_bytes,
366 void* p_user_data); 364 void* p_user_data);
367 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, 365 OPJ_SIZE_T opj_write_from_memory(void* p_buffer,
368 OPJ_SIZE_T nb_bytes, 366 OPJ_SIZE_T nb_bytes,
369 void* p_user_data); 367 void* p_user_data);
370 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); 368 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data);
371 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); 369 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data);
372 370
373 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ 371 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdftext/fpdf_text.cpp ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698