summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_iccprofile.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-07-12 11:04:12 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-12 18:26:43 +0000
commit58bf3de718e510648ee136c887be5b2d577644a7 (patch)
treefceba4f29df5fc6ecf4da1cf41d6bae0cdda05d2 /core/fpdfapi/page/cpdf_iccprofile.cpp
parent071f5eda0399d6f260cc1b67beffcdaa315a9af7 (diff)
downloadpdfium-58bf3de718e510648ee136c887be5b2d577644a7.tar.xz
Cleanup ICC code part 1
This CL switches void* to CLcmsCmm*, simplifies the ownership and destruction of CLcmsCmm, and reduces unnecessary function calling in fx_codec_icc.cpp. Change-Id: Ifdbf59dcdaede497d1684b161dd066726cf08ee3 Reviewed-on: https://pdfium-review.googlesource.com/7590 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_iccprofile.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_iccprofile.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_iccprofile.cpp b/core/fpdfapi/page/cpdf_iccprofile.cpp
index afb505a7e6..0fa4be4b5a 100644
--- a/core/fpdfapi/page/cpdf_iccprofile.cpp
+++ b/core/fpdfapi/page/cpdf_iccprofile.cpp
@@ -8,7 +8,6 @@
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
-#include "core/fxcodec/codec/ccodec_iccmodule.h"
namespace {
@@ -29,12 +28,9 @@ CPDF_IccProfile::CPDF_IccProfile(CPDF_Stream* pStream,
uint32_t nSrcComps = 0;
auto* pIccModule = CPDF_ModuleMgr::Get()->GetIccModule();
- m_pTransform = pIccModule->CreateTransform_sRGB(pData, dwSize, nSrcComps);
- if (m_pTransform)
+ m_Transform = pIccModule->CreateTransform_sRGB(pData, dwSize, &nSrcComps);
+ if (m_Transform)
m_nSrcComponents = nSrcComps;
}
-CPDF_IccProfile::~CPDF_IccProfile() {
- if (m_pTransform)
- CPDF_ModuleMgr::Get()->GetIccModule()->DestroyTransform(m_pTransform);
-}
+CPDF_IccProfile::~CPDF_IccProfile() {}