summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_gemodule.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-05-11 16:10:16 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-15 19:51:15 +0000
commit0c7f94f7f36d0bd8b0bbd0d3d440a8953499d47a (patch)
treebbccec58d7495918973959a9220f8fc46823556a /core/fxge/ge/cfx_gemodule.cpp
parent4b78b18a87210d2d7550aa6c097f54ebf2c95e02 (diff)
downloadpdfium-0c7f94f7f36d0bd8b0bbd0d3d440a8953499d47a.tar.xz
Remove gamma code
The gamma value is always 2.2, which means the table entries all point to themselves. Remove the usage of the gamma table. Change-Id: Idbb06015e8acd9f106f4bd1da5ef06563fb26296 Reviewed-on: https://pdfium-review.googlesource.com/5352 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/ge/cfx_gemodule.cpp')
-rw-r--r--core/fxge/ge/cfx_gemodule.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/fxge/ge/cfx_gemodule.cpp b/core/fxge/ge/cfx_gemodule.cpp
index 2cd1e31144..d7ae098f31 100644
--- a/core/fxge/ge/cfx_gemodule.cpp
+++ b/core/fxge/ge/cfx_gemodule.cpp
@@ -47,7 +47,6 @@ void CFX_GEModule::Init(const char** userFontPaths) {
ASSERT(g_pGEModule);
m_pUserFontPaths = userFontPaths;
InitPlatform();
- SetTextGamma(2.2f);
}
CFX_FontCache* CFX_GEModule::GetFontCache() {
@@ -55,15 +54,3 @@ CFX_FontCache* CFX_GEModule::GetFontCache() {
m_pFontCache = pdfium::MakeUnique<CFX_FontCache>();
return m_pFontCache.get();
}
-
-void CFX_GEModule::SetTextGamma(float gammaValue) {
- gammaValue /= 2.2f;
- for (int i = 0; i < 256; ++i) {
- m_GammaValue[i] = static_cast<uint8_t>(
- FXSYS_pow(static_cast<float>(i) / 255, gammaValue) * 255.0f + 0.5f);
- }
-}
-
-const uint8_t* CFX_GEModule::GetTextGammaTable() const {
- return m_GammaValue;
-}