summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-10 12:35:07 -0800
committerWei Li <weili@chromium.org>2016-03-10 12:35:07 -0800
commit79fcb5f6fa61967517566100415972848edefd24 (patch)
tree314016e327303cd3e4e3da06dd1789b79ecbf352 /core/include
parent2852ce07c4e5b1053420cbf375e098e09faf679c (diff)
downloadpdfium-79fcb5f6fa61967517566100415972848edefd24.tar.xz
Change colorspace's number of components to be unsigned
Also remove unnecessary casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783933002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_resource.h9
-rw-r--r--core/include/fxcodec/fx_codec.h5
2 files changed, 6 insertions, 8 deletions
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index a5acc77762..f4dd6331de 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -435,7 +435,7 @@ class CPDF_ColorSpace {
int GetBufSize() const;
FX_FLOAT* CreateBuf();
void GetDefaultColor(FX_FLOAT* buf) const;
- int CountComponents() const { return m_nComponents; }
+ FX_DWORD CountComponents() const { return m_nComponents; }
int GetFamily() const { return m_Family; }
virtual void GetDefaultValue(int iComponent,
FX_FLOAT& value,
@@ -485,7 +485,7 @@ class CPDF_ColorSpace {
CPDF_Document* const m_pDocument;
protected:
- CPDF_ColorSpace(CPDF_Document* pDoc, int family, int nComponents)
+ CPDF_ColorSpace(CPDF_Document* pDoc, int family, FX_DWORD nComponents)
: m_pDocument(pDoc),
m_Family(family),
m_nComponents(nComponents),
@@ -511,11 +511,8 @@ class CPDF_ColorSpace {
}
int m_Family;
-
- int m_nComponents;
-
+ FX_DWORD m_nComponents;
CPDF_Array* m_pArray;
-
FX_DWORD m_dwStdConversion;
};
class CPDF_Color {
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 5c289c1a48..183783d86c 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -458,6 +458,7 @@ class ICodec_Jbig2Encoder {
public:
virtual ~ICodec_Jbig2Encoder() {}
};
+
class ICodec_IccModule {
public:
enum IccCS {
@@ -504,14 +505,14 @@ class ICodec_IccModule {
virtual void* CreateTransform_sRGB(
const uint8_t* pProfileData,
FX_DWORD dwProfileSize,
- int32_t& nComponents,
+ FX_DWORD& nComponents,
int32_t intent = 0,
FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT) = 0;
virtual void* CreateTransform_CMYK(
const uint8_t* pSrcProfileData,
FX_DWORD dwSrcProfileSize,
- int32_t& nSrcComponents,
+ FX_DWORD& nSrcComponents,
const uint8_t* pDstProfileData,
FX_DWORD dwDstProfileSize,
int32_t intent = 0,