From 56e04d2656bdd5f2b9448d857e8e73ab16aadf8e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 21 Nov 2017 22:07:50 +0000 Subject: Avoid passing pointers by reference in core. This gets rid of most core/ non-const ref passing, either by passing by pointer-to-pointer instead, or by returning std::pair. Change-Id: Id7bdc355a1a725a05f9fa2f1e982ca8c975beef1 Reviewed-on: https://pdfium-review.googlesource.com/19030 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fxcodec/codec/ccodec_pngmodule.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/fxcodec/codec/ccodec_pngmodule.h') diff --git a/core/fxcodec/codec/ccodec_pngmodule.h b/core/fxcodec/codec/ccodec_pngmodule.h index 121e646a86..847f67e8eb 100644 --- a/core/fxcodec/codec/ccodec_pngmodule.h +++ b/core/fxcodec/codec/ccodec_pngmodule.h @@ -28,7 +28,11 @@ class CCodec_PngModule { int pass, int* color_type, double* gamma) = 0; - virtual bool PngAskScanlineBuf(int line, uint8_t*& src_buf) = 0; + + // Returns true on success. |pSrcBuf| will be set if this succeeds. + // |pSrcBuf| does not take ownership of the buffer. + virtual bool PngAskScanlineBuf(int line, uint8_t** pSrcBuf) = 0; + virtual void PngFillScanlineBufCompleted(int pass, int line) = 0; }; -- cgit v1.2.3