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

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

Issue 1841643002: Code change to avoid signed/unsigned mismatch warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase 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 unified diff | Download patch
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 enum class Type { 380 enum class Type {
381 kType0Sampled, 381 kType0Sampled,
382 kType2ExpotentialInterpolation, 382 kType2ExpotentialInterpolation,
383 kType3Stitching, 383 kType3Stitching,
384 kType4PostScript, 384 kType4PostScript,
385 }; 385 };
386 386
387 static CPDF_Function* Load(CPDF_Object* pFuncObj); 387 static CPDF_Function* Load(CPDF_Object* pFuncObj);
388 virtual ~CPDF_Function(); 388 virtual ~CPDF_Function();
389 FX_BOOL Call(FX_FLOAT* inputs, 389 FX_BOOL Call(FX_FLOAT* inputs,
390 int ninputs, 390 uint32_t ninputs,
391 FX_FLOAT* results, 391 FX_FLOAT* results,
392 int& nresults) const; 392 int& nresults) const;
393 int CountInputs() const { return m_nInputs; } 393 uint32_t CountInputs() const { return m_nInputs; }
394 int 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]; }
396 Type GetType() const { return m_Type; } 396 Type GetType() const { return m_Type; }
397 397
398 protected: 398 protected:
399 CPDF_Function(Type type); 399 CPDF_Function(Type type);
400 FX_BOOL Init(CPDF_Object* pObj); 400 FX_BOOL Init(CPDF_Object* pObj);
401 virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0; 401 virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0;
402 virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const = 0; 402 virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const = 0;
403 403
404 int m_nInputs; 404 uint32_t m_nInputs;
405 int m_nOutputs; 405 uint32_t m_nOutputs;
406 FX_FLOAT* m_pDomains; 406 FX_FLOAT* m_pDomains;
407 FX_FLOAT* m_pRanges; 407 FX_FLOAT* m_pRanges;
408 Type m_Type; 408 Type m_Type;
409 }; 409 };
410 410
411 class CPDF_ExpIntFunc : public CPDF_Function { 411 class CPDF_ExpIntFunc : public CPDF_Function {
412 public: 412 public:
413 CPDF_ExpIntFunc(); 413 CPDF_ExpIntFunc();
414 ~CPDF_ExpIntFunc() override; 414 ~CPDF_ExpIntFunc() override;
415 415
416 // CPDF_Function 416 // CPDF_Function
417 FX_BOOL v_Init(CPDF_Object* pObj) override; 417 FX_BOOL v_Init(CPDF_Object* pObj) override;
418 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; 418 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
419 419
420 int m_nOrigOutputs; 420 uint32_t m_nOrigOutputs;
421 FX_FLOAT m_Exponent; 421 FX_FLOAT m_Exponent;
422 FX_FLOAT* m_pBeginValues; 422 FX_FLOAT* m_pBeginValues;
423 FX_FLOAT* m_pEndValues; 423 FX_FLOAT* m_pEndValues;
424 }; 424 };
425 425
426 class CPDF_StitchFunc : public CPDF_Function { 426 class CPDF_StitchFunc : public CPDF_Function {
427 public: 427 public:
428 CPDF_StitchFunc(); 428 CPDF_StitchFunc();
429 ~CPDF_StitchFunc() override; 429 ~CPDF_StitchFunc() override;
430 430
431 // CPDF_Function 431 // CPDF_Function
432 FX_BOOL v_Init(CPDF_Object* pObj) override; 432 FX_BOOL v_Init(CPDF_Object* pObj) override;
433 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; 433 FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
434 434
435 std::vector<CPDF_Function*> m_pSubFunctions; 435 std::vector<CPDF_Function*> m_pSubFunctions;
436 FX_FLOAT* m_pBounds; 436 FX_FLOAT* m_pBounds;
437 FX_FLOAT* m_pEncode; 437 FX_FLOAT* m_pEncode;
438 438
439 static const int kRequiredNumInputs = 1; 439 static const uint32_t kRequiredNumInputs = 1;
440 }; 440 };
441 441
442 class CPDF_IccProfile { 442 class CPDF_IccProfile {
443 public: 443 public:
444 CPDF_IccProfile(const uint8_t* pData, uint32_t dwSize); 444 CPDF_IccProfile(const uint8_t* pData, uint32_t dwSize);
445 ~CPDF_IccProfile(); 445 ~CPDF_IccProfile();
446 uint32_t GetComponents() const { return m_nSrcComponents; } 446 uint32_t GetComponents() const { return m_nSrcComponents; }
447 FX_BOOL m_bsRGB; 447 FX_BOOL m_bsRGB;
448 void* m_pTransform; 448 void* m_pTransform;
449 449
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 CPDF_Pattern* m_pPattern; 502 CPDF_Pattern* m_pPattern;
503 CPDF_CountedPattern* m_pCountedPattern; 503 CPDF_CountedPattern* m_pCountedPattern;
504 int m_nComps; 504 int m_nComps;
505 FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS]; 505 FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS];
506 }; 506 };
507 507
508 void PDF_ReplaceAbbr(CPDF_Object* pObj); 508 void PDF_ReplaceAbbr(CPDF_Object* pObj);
509 bool IsPathOperator(const uint8_t* buf, size_t len); 509 bool IsPathOperator(const uint8_t* buf, size_t len);
510 510
511 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 511 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698