From ba9d4655ca39c3a4620acb8e6252defb87a758ad Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 30 Oct 2015 15:51:13 -0700 Subject: Merge to XFA: Remove external jpeg provider interface. (cherry picked from commit 3d59bd9d66d01eb39c30742bce67fa0376cb4ea8) Review URL: https://codereview.chromium.org/1407903005 . Conflicts: core/include/fxcodec/fx_codec_provider.h core/src/fxcodec/codec/codec_int.h core/src/fxcodec/codec/fx_codec_jpeg.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1412713009 . --- core/include/fxcodec/fx_codec.h | 3 -- core/include/fxcodec/fx_codec_provider.h | 77 -------------------------------- 2 files changed, 80 deletions(-) delete mode 100644 core/include/fxcodec/fx_codec_provider.h (limited to 'core/include/fxcodec') diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h index 82af1aa560..fe3d84d53e 100644 --- a/core/include/fxcodec/fx_codec.h +++ b/core/include/fxcodec/fx_codec.h @@ -13,7 +13,6 @@ #include "../../../third_party/base/nonstd_unique_ptr.h" #include "../fxcrt/fx_basic.h" #include "fx_codec_def.h" -#include "fx_codec_provider.h" #include "../fxcrt/fx_coordinates.h" // For FX_RECT. @@ -195,8 +194,6 @@ class ICodec_JpegModule { public: virtual ~ICodec_JpegModule() {} - virtual void SetPovider(IFX_JpegProvider* pJP) = 0; - virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD src_size, int width, diff --git a/core/include/fxcodec/fx_codec_provider.h b/core/include/fxcodec/fx_codec_provider.h deleted file mode 100644 index bd4db44c89..0000000000 --- a/core/include/fxcodec/fx_codec_provider.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ -#define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ - -#include "../fxcrt/fx_system.h" - -class CFX_DIBAttribute; - -class IFX_JpegProvider { - public: - virtual void Release() = 0; - - virtual void* CreateDecoder(const uint8_t* src_buf, - FX_DWORD src_size, - int width, - int height, - int nComps, - FX_BOOL ColorTransform) = 0; - - virtual void DestroyDecoder(void* pDecoder) = 0; - - virtual void DownScale(void* pDecoder, int dest_width, int dest_height) = 0; - - virtual FX_BOOL Rewind(void* pDecoder) = 0; - - virtual uint8_t* GetNextLine(void* pDecoder) = 0; - - virtual FX_DWORD GetSrcOffset(void* pDecoder) = 0; - - virtual FX_BOOL LoadInfo(const uint8_t* src_buf, - FX_DWORD src_size, - int& width, - int& height, - int& num_components, - int& bits_per_components, - FX_BOOL& color_transform, - uint8_t** icc_buf_ptr = NULL, - FX_DWORD* icc_length = NULL) = 0; - - virtual FX_BOOL Encode(const class CFX_DIBSource* pSource, - uint8_t*& dest_buf, - FX_STRSIZE& dest_size, - int quality = 75, - const uint8_t* icc_buf = NULL, - FX_DWORD icc_length = 0) = 0; - - virtual void* Start() = 0; - - virtual void Finish(void* pContext) = 0; - - virtual void Input(void* pContext, - const uint8_t* src_buf, - FX_DWORD src_size) = 0; - - virtual int ReadHeader(void* pContext, - int* width, - int* height, - int* nComps, - CFX_DIBAttribute* pAttribute = NULL) = 0; - - virtual int StartScanline(void* pContext, int down_scale) = 0; - - virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0; - - virtual FX_DWORD GetAvailInput(void* pContext, - uint8_t** avail_buf_ptr = NULL) = 0; - - protected: - ~IFX_JpegProvider() {} -}; - -#endif // CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ -- cgit v1.2.3