Commit d5efac76 authored by Philipp Knechtges's avatar Philipp Knechtges Committed by Albert Astals Cid

Revert "GfxICCBasedColorSpace: Remove unused member variable"

This reverts commit 8c8e0a14.
parent 846437d9
......@@ -1724,9 +1724,11 @@ void GfxLabColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange,
// GfxICCBasedColorSpace
//------------------------------------------------------------------------
GfxICCBasedColorSpace::GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA) {
GfxICCBasedColorSpace::GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
const Ref *iccProfileStreamA) {
nComps = nCompsA;
alt = altA;
iccProfileStream = *iccProfileStreamA;
rangeMin[0] = rangeMin[1] = rangeMin[2] = rangeMin[3] = 0;
rangeMax[0] = rangeMax[1] = rangeMax[2] = rangeMax[3] = 1;
#ifdef USE_CMS
......@@ -1751,7 +1753,7 @@ GfxColorSpace *GfxICCBasedColorSpace::copy() const {
GfxICCBasedColorSpace *cs;
int i;
cs = new GfxICCBasedColorSpace(nComps, alt->copy());
cs = new GfxICCBasedColorSpace(nComps, alt->copy(), &iccProfileStream);
for (i = 0; i < 4; ++i) {
cs->rangeMin[i] = rangeMin[i];
cs->rangeMax[i] = rangeMax[i];
......@@ -1846,7 +1848,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
delete altA;
return nullptr;
}
cs = new GfxICCBasedColorSpace(nCompsA, altA);
cs = new GfxICCBasedColorSpace(nCompsA, altA, &iccProfileStreamA);
obj2 = dict->lookup("Range");
if (obj2.isArray() && obj2.arrayGetLength() == 2 * nCompsA) {
for (i = 0; i < nCompsA; ++i) {
......
......@@ -538,8 +538,9 @@ private:
class GfxICCBasedColorSpace: public GfxColorSpace {
public:
GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA);
~GfxICCBasedColorSpace() override;
GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
const Ref *iccProfileStreamA);
~GfxICCBasedColorSpace();
GfxColorSpace *copy() const override;
GfxColorSpaceMode getMode() const override { return csICCBased; }
......@@ -575,6 +576,7 @@ private:
GfxColorSpace *alt; // alternate color space
double rangeMin[4]; // min values for each component
double rangeMax[4]; // max values for each component
Ref iccProfileStream; // the ICC profile
#ifdef USE_CMS
int getIntent() { return (transform != nullptr) ? transform->getIntent() : 0; }
GfxColorTransform *transform;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment