1 // Copyright 2017 PDFium Authors. All rights reserved. 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 <set> 11 12 #include "core/fpdfapi/page/cpdf_function.h" 13 #include "core/fpdfapi/page/cpdf_psengine.h" 14 15 class CPDF_Object; 16 17 class CPDF_PSFunc final : public CPDF_Function { 18 public: 19 CPDF_PSFunc(); 20 ~CPDF_PSFunc() override; 21 22 // CPDF_Function 23 bool v_Init(const CPDF_Object* pObj, 24 std::set<const CPDF_Object*>* pVisited) override; 25 bool v_Call(const float* inputs, float* results) const override; 26 27 private: 28 mutable CPDF_PSEngine m_PS; // Pre-initialized scratch space for v_Call(). 29 }; 30 31 #endif // CORE_FPDFAPI_PAGE_CPDF_PSFUNC_H_ 32