summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-07-29 08:55:54 -0700
committerNico Weber <thakis@chromium.org>2014-07-29 08:55:54 -0700
commitc77e8f73397613f278eaeef2cae44debc6a684c8 (patch)
tree325d52616e193459f3cb248ce910852333d5d59d /core/src/fxge/ge
parent3b07e751353a12d1b4605abfa96881c8eae1bbe5 (diff)
downloadpdfium-c77e8f73397613f278eaeef2cae44debc6a684c8.tar.xz
Remove a few unused variables, functions, and tables.
Found by clang's -Wunused-variable, -Wunused-function, -Wunused-const-variable. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/404653005
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp1
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp4
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp1
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp64
4 files changed, 1 insertions, 69 deletions
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index f3254ea3de..817f3712d9 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -40,7 +40,6 @@ CFX_Font::~CFX_Font()
#endif
if (m_Face) {
#ifdef FOXIT_CHROME_BUILD
- FXFT_Library library = FXFT_Get_Face_FreeType(m_Face);
if (FXFT_Get_Face_External_Stream(m_Face)) {
FXFT_Clear_Face_External_Stream(m_Face);
}
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 1b47f1ff14..f5d378d55b 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -975,8 +975,6 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, FX_BOOL bTru
FX_BOOL bItalic = FALSE;
FX_DWORD nStyle = 0;
FX_BOOL bStyleAvail = FALSE;
- FX_BOOL bFamilyStyleIsWhole = FALSE;
- FX_BOOL bNextF = FALSE;
if (iBaseFont < 12) {
family = g_Base14FontNames[iBaseFont];
if ((iBaseFont % 4) == 1 || (iBaseFont % 4) == 2) {
@@ -1535,7 +1533,7 @@ FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE
}
if (datasize && size >= datasize && pFile) {
FXSYS_fseek(pFile, offset, FXSYS_SEEK_SET);
- size_t readCnt = FXSYS_fread(buffer, datasize, 1, pFile);
+ FXSYS_fread(buffer, datasize, 1, pFile);
}
if (pFile) {
FXSYS_fclose(pFile);
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index cd3ff0efbe..b96a2f1163 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -405,7 +405,6 @@ void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix)
pMatrix->Transform(m_pPoints[i].m_PointX, m_pPoints[i].m_PointY);
}
}
-const int g_Distant[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
FX_BOOL CFX_PathData::GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* pMatrix, FX_BOOL&bThin, FX_BOOL bAdjust) const
{
if (m_PointCount < 3) {
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 40acc5fe34..80af2ff197 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -78,28 +78,6 @@ static void _AdjustGlyphSpace(FXTEXT_GLYPHPOS* pGlyphAndPos, int nChars)
next_origin_f = this_origin_f;
}
}
-static const FX_BYTE g_GdipGamma_bgw[9] = {0, 0, 63, 120, 0, 168, 210, 239, 255};
-static const FX_BYTE g_GdipGamma_fgw[9] = {0, 0, 16, 45, 0, 87, 135, 192, 255};
-static const FX_BYTE g_GdipGammaAdjust_47[48] = {
- 0, 30, 33, 34, 35, 36, 37, 38, 38, 39, 39, 40, 40, 40, 41, 41, 41, 42, 42, 42, 42, 43,
- 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 46,
- 46, 46, 46, 46, 46, 46, 46, 47
-};
-static const FX_BYTE g_GdipGammaAdjust_75[76] = {
- 0, 46, 50, 52, 54, 55, 56, 57, 58, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 64, 65,
- 65, 65, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70,
- 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73,
- 73, 74, 74, 74, 74, 74, 74, 74, 74, 75
-};
-static const FX_BYTE g_GdipGammaAdjust_81[82] = {
- 0, 49, 53, 56, 58, 59, 60, 61, 62, 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 69, 70, 70, 70,
- 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 76,
- 76, 76, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 80,
- 80, 80, 80, 80, 80, 80, 80, 81
-};
-static void _Adjust_alpha(int background, int foreground, int& src_alpha, int text_flags, int a)
-{
-}
static const FX_BYTE g_TextGammaAdjust[256] = {
0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19,
21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 38,
@@ -1213,48 +1191,6 @@ CFX_SizeGlyphCache::~CFX_SizeGlyphCache()
#else
#define CONTRAST_RAMP_STEP 1
#endif
-static const FX_BYTE g_adjust_contrast11[256] = {
- 0, 0, 2, 3, 4, 5, 6, 8, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 24, 25, 26, 28, 29, 31,
- 32, 33, 35, 36, 38, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 56, 58, 59, 61, 62, 64, 65,
- 67, 68, 70, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 91, 93, 94, 96, 97, 99, 100,
- 101, 103, 104, 106, 107, 109, 110, 111, 113, 114, 116, 117, 118, 120, 121, 123, 124, 125, 127,
- 128, 130, 131, 132, 134, 135, 136, 138, 139, 140, 142, 143, 144, 146, 147, 148, 149, 151, 152,
- 153, 155, 156, 157, 158, 160, 161, 162, 163, 165, 166, 167, 168, 169, 171, 172, 173, 174, 175,
- 177, 178, 179, 180, 181, 182, 183, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
- 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 215, 216, 217, 218, 219, 220, 221, 221, 222, 223, 224, 224, 225, 226, 227, 227, 228, 229, 230,
- 230, 231, 232, 232, 233, 234, 234, 235, 236, 236, 237, 237, 238, 239, 239, 240, 240, 241, 241,
- 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 246, 247, 247, 248, 248, 248, 249, 249, 249,
- 250, 250, 250, 251, 251, 251, 251, 252, 252, 252, 252, 253, 253, 253, 253, 253, 253, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 255,
-};
-static const FX_BYTE g_adjust_contrast15[256] = {
- 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51,
- 52, 54, 55, 56, 58, 59, 60, 62, 63, 64, 66, 67, 68, 70, 71, 73, 74, 75, 77, 78, 80, 81, 82, 84, 85, 87,
- 88, 90, 91, 93, 94, 95, 97, 98, 100, 101, 103, 104, 106, 107, 109, 110, 111, 113, 114, 116, 117, 119,
- 120, 122, 123, 125, 126, 128, 129, 130, 132, 133, 135, 136, 138, 139, 141, 142, 143, 145, 146, 148,
- 149, 150, 152, 153, 155, 156, 157, 159, 160, 161, 163, 164, 166, 167, 168, 170, 171, 172, 174, 175,
- 176, 177, 179, 180, 181, 183, 184, 185, 186, 188, 189, 190, 191, 192, 194, 195, 196, 197, 198, 199,
- 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 227, 228, 229, 230, 231, 232, 232, 233, 234, 235, 235, 236, 237,
- 237, 238, 239, 239, 240, 241, 241, 242, 242, 243, 244, 244, 245, 245, 246, 246, 247, 247, 248, 248,
- 248, 249, 249, 250, 250, 250, 251, 251, 251, 252, 252, 252, 252, 253, 253, 253, 253, 253, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 255,
-};
-static void _CalcContrastRamp(FX_LPBYTE ramp, int level)
-{
- int contrast_min = 0, contrast_max = 255 - level, i;
- for (i = 0; i < contrast_min; i ++) {
- ramp[i] = 0;
- }
- for (i = contrast_min; i < contrast_max; i ++) {
- ramp[i] = 255 * (i - contrast_min) / (contrast_max - contrast_min);
- }
- for (i = contrast_max; i < 256; i ++) {
- ramp[i] = 255;
- }
-}
void CFX_Font::AdjustMMParams(int glyph_index, int dest_width, int weight)
{
FXFT_MM_Var pMasters = NULL;