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

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_func.cpp

Issue 1870463002: flesh out gradient shaders (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: add comment Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_page/pageint.h » ('j') | core/fxge/skia/fx_skia_device.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_func.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
index ebd6811da83e8a769b66795324c5866006004094..80554ce4ce8b885db39c51e1522111c7fd6f1bdf 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -491,27 +491,8 @@ static uint32_t _GetBits32(const uint8_t* pData, int bitpos, int nbits) {
}
return result;
}
-typedef struct {
- FX_FLOAT encode_max, encode_min;
- int sizes;
-} SampleEncodeInfo;
-typedef struct { FX_FLOAT decode_max, decode_min; } SampleDecodeInfo;
-class CPDF_SampledFunc : public CPDF_Function {
- public:
- CPDF_SampledFunc();
- ~CPDF_SampledFunc() override;
-
- // CPDF_Function
- FX_BOOL v_Init(CPDF_Object* pObj) override;
- FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
-
- SampleEncodeInfo* m_pEncodeInfo;
- SampleDecodeInfo* m_pDecodeInfo;
- uint32_t m_nBitsPerSample;
- uint32_t m_SampleMax;
- CPDF_StreamAcc* m_pSampleStream;
-};
+} // namespace
CPDF_SampledFunc::CPDF_SampledFunc() : CPDF_Function(Type::kType0Sampled) {
m_pSampleStream = NULL;
@@ -524,6 +505,7 @@ CPDF_SampledFunc::~CPDF_SampledFunc() {
FX_Free(m_pEncodeInfo);
FX_Free(m_pDecodeInfo);
}
+
FX_BOOL CPDF_SampledFunc::v_Init(CPDF_Object* pObj) {
CPDF_Stream* pStream = pObj->AsStream();
if (!pStream)
@@ -579,6 +561,7 @@ FX_BOOL CPDF_SampledFunc::v_Init(CPDF_Object* pObj) {
}
return TRUE;
}
+
FX_BOOL CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
int pos = 0;
CFX_FixedBufGrow<FX_FLOAT, 16> encoded_input_buf(m_nInputs);
@@ -650,6 +633,8 @@ FX_BOOL CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
return TRUE;
}
+namespace {
+
class CPDF_PSFunc : public CPDF_Function {
dsinclair 2016/04/11 14:29:28 Can this be moved up into the namespace {} at the
caryclark 2016/04/11 15:01:50 Done.
public:
// CPDF_Function
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_page/pageint.h » ('j') | core/fxge/skia/fx_skia_device.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698