summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_dibtransferfunc.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-12-02 14:01:36 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-02 14:01:36 -0800
commit4bed2af0c049bf499dcdb1327a47d40b4c0db92d (patch)
tree04239e723c4d27c02d3edd78e3e93012d517ba6e /core/fpdfapi/render/cpdf_dibtransferfunc.h
parent0527ec571a8842b84f5161dc67f8da439e65eb12 (diff)
downloadpdfium-4bed2af0c049bf499dcdb1327a47d40b4c0db92d.tar.xz
Rename fpdf_render_image and fpdf_render_textchromium/2942chromium/2941chromium/2940
Review-Url: https://codereview.chromium.org/2551593002
Diffstat (limited to 'core/fpdfapi/render/cpdf_dibtransferfunc.h')
-rw-r--r--core/fpdfapi/render/cpdf_dibtransferfunc.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/core/fpdfapi/render/cpdf_dibtransferfunc.h b/core/fpdfapi/render/cpdf_dibtransferfunc.h
new file mode 100644
index 0000000000..d290c00d8a
--- /dev/null
+++ b/core/fpdfapi/render/cpdf_dibtransferfunc.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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_FPDFAPI_RENDER_CPDF_DIBTRANSFERFUNC_H_
+#define CORE_FPDFAPI_RENDER_CPDF_DIBTRANSFERFUNC_H_
+
+#include <vector>
+
+#include "core/fxge/fx_dib.h"
+
+class CPDF_TransferFunc;
+
+class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
+ public:
+ explicit CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc);
+ ~CPDF_DIBTransferFunc() override;
+
+ // CFX_FilteredDIB
+ FXDIB_Format GetDestFormat() override;
+ FX_ARGB* GetDestPalette() override;
+ void TranslateScanline(const uint8_t* src_buf,
+ std::vector<uint8_t>* dest_buf) const override;
+ void TranslateDownSamples(uint8_t* dest_buf,
+ const uint8_t* src_buf,
+ int pixels,
+ int Bpp) const override;
+
+ private:
+ const uint8_t* m_RampR;
+ const uint8_t* m_RampG;
+ const uint8_t* m_RampB;
+};
+
+#endif // CORE_FPDFAPI_RENDER_CPDF_DIBTRANSFERFUNC_H_