summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-22 14:18:55 -0800
committerLei Zhang <thestig@chromium.org>2015-12-22 14:18:55 -0800
commit2d63eaaa39bb3d402c658b2a6e0eae50a30f1d89 (patch)
tree02310313949cac5660a5bbc20ba72367afa5e864 /core/include/fpdfapi
parent1fc92867ca53f0fba4272fbee3814d844f487495 (diff)
downloadpdfium-2d63eaaa39bb3d402c658b2a6e0eae50a30f1d89.tar.xz
Cleanup: Remove unused CFX_PSRenderer and various encoders it used.
- Simplify remaining encoders. - Hook up more of the encoding paths so failures get returned. - Clean up code to not pass by non-const ref, use bools, etc. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1545563003 .
Diffstat (limited to 'core/include/fpdfapi')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index 752df789da..1e2706ddcf 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -826,18 +826,19 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec);
void FPDF_FileSpec_SetWin32Path(CPDF_Object* pFileSpec,
const CFX_WideString& fullpath);
-void FlateEncode(const uint8_t* src_buf,
+bool FlateEncode(const uint8_t* src_buf,
FX_DWORD src_size,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
- int predictor,
- int Colors,
- int BitsPerComponent,
- int Columns,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint8_t** dest_buf,
+ FX_DWORD* dest_size);
+
+// This used to have more parameters like the predictor and bpc, but there was
+// only one callers, so the interface has been simplified, the values are hard
+// coded, and dead code has been removed.
+bool PngEncode(const uint8_t* src_buf,
+ FX_DWORD src_size,
+ uint8_t** dest_buf,
+ FX_DWORD* dest_size);
+
FX_DWORD FlateDecode(const uint8_t* src_buf,
FX_DWORD src_size,
uint8_t*& dest_buf,