1 // Copyright 2017 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_PSFUNC_H_ 8 #define CORE_FPDFAPI_PAGE_CPDF_PSFUNC_H_ 9 10 #include "core/fpdfapi/page/cpdf_function.h" 11 #include "core/fpdfapi/page/cpdf_psengine.h" 12 13 class CPDF_Object; 14 15 class CPDF_PSFunc final : public CPDF_Function { 16 public: 17 CPDF_PSFunc(); 18 ~CPDF_PSFunc() override; 19 20 // CPDF_Function: 21 bool v_Init(const CPDF_Object* pObj, VisitedSet* pVisited) override; 22 bool v_Call(pdfium::span<const float> inputs, 23 pdfium::span<float> results) const override; 24 25 private: 26 mutable CPDF_PSEngine m_PS; // Pre-initialized scratch space for v_Call(). 27 }; 28 29 #endif // CORE_FPDFAPI_PAGE_CPDF_PSFUNC_H_ 30