Chromium Code Reviews

Side by Side Diff: core/fpdfapi/fpdf_page/pageint.h

Issue 2000973002: Make CPDF_Function::Load() return an unique_ptr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 364 matching lines...)
375 class CPDF_Function { 375 class CPDF_Function {
376 public: 376 public:
377 enum class Type { 377 enum class Type {
378 kTypeInvalid = -1, 378 kTypeInvalid = -1,
379 kType0Sampled = 0, 379 kType0Sampled = 0,
380 kType2ExpotentialInterpolation = 2, 380 kType2ExpotentialInterpolation = 2,
381 kType3Stitching = 3, 381 kType3Stitching = 3,
382 kType4PostScript = 4, 382 kType4PostScript = 4,
383 }; 383 };
384 384
385 static CPDF_Function* Load(CPDF_Object* pFuncObj); 385 static std::unique_ptr<CPDF_Function> Load(CPDF_Object* pFuncObj);
386 static Type IntegerToFunctionType(int iType); 386 static Type IntegerToFunctionType(int iType);
387 387
388 virtual ~CPDF_Function(); 388 virtual ~CPDF_Function();
389 FX_BOOL Call(FX_FLOAT* inputs, 389 FX_BOOL Call(FX_FLOAT* inputs,
390 uint32_t ninputs, 390 uint32_t ninputs,
391 FX_FLOAT* results, 391 FX_FLOAT* results,
392 int& nresults) const; 392 int& nresults) const;
393 uint32_t CountInputs() const { return m_nInputs; } 393 uint32_t CountInputs() const { return m_nInputs; }
394 uint32_t CountOutputs() const { return m_nOutputs; } 394 uint32_t CountOutputs() const { return m_nOutputs; }
395 FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; } 395 FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; }
(...skipping 157 matching lines...)
553 }; 553 };
554 554
555 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr); 555 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr);
556 CFX_ByteStringC PDF_FindValueAbbreviationForTesting( 556 CFX_ByteStringC PDF_FindValueAbbreviationForTesting(
557 const CFX_ByteStringC& abbr); 557 const CFX_ByteStringC& abbr);
558 558
559 void PDF_ReplaceAbbr(CPDF_Object* pObj); 559 void PDF_ReplaceAbbr(CPDF_Object* pObj);
560 bool IsPathOperator(const uint8_t* buf, size_t len); 560 bool IsPathOperator(const uint8_t* buf, size_t len);
561 561
562 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 562 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
OLDNEW

Powered by Google App Engine