Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: core/fxge/ge/fx_ge_text.cpp

Issue 2060913003: Make code compile with clang_use_chrome_plugin (part II) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxge/ge/fx_ge_path.cpp ('k') | core/fxge/ge/fx_text_int.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "core/fxcodec/include/fx_codec.h" 10 #include "core/fxcodec/include/fx_codec.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 else 926 else
927 keygen.Generate(6, (int)(pMatrix->a * 10000), (int)(pMatrix->b * 10000), 927 keygen.Generate(6, (int)(pMatrix->a * 10000), (int)(pMatrix->b * 10000),
928 (int)(pMatrix->c * 10000), (int)(pMatrix->d * 10000), 928 (int)(pMatrix->c * 10000), (int)(pMatrix->d * 10000),
929 dest_width, anti_alias); 929 dest_width, anti_alias);
930 CFX_ByteString FaceGlyphsKey2(keygen.m_Key, keygen.m_KeyLen); 930 CFX_ByteString FaceGlyphsKey2(keygen.m_Key, keygen.m_KeyLen);
931 text_flags |= FXTEXT_NO_NATIVETEXT; 931 text_flags |= FXTEXT_NO_NATIVETEXT;
932 return LookUpGlyphBitmap(pFont, pMatrix, FaceGlyphsKey2, glyph_index, 932 return LookUpGlyphBitmap(pFont, pMatrix, FaceGlyphsKey2, glyph_index,
933 bFontStyle, dest_width, anti_alias); 933 bFontStyle, dest_width, anti_alias);
934 #endif 934 #endif
935 } 935 }
936
937 CFX_SizeGlyphCache::CFX_SizeGlyphCache() {}
938
936 CFX_SizeGlyphCache::~CFX_SizeGlyphCache() { 939 CFX_SizeGlyphCache::~CFX_SizeGlyphCache() {
937 for (const auto& pair : m_GlyphMap) { 940 for (const auto& pair : m_GlyphMap) {
938 delete pair.second; 941 delete pair.second;
939 } 942 }
940 m_GlyphMap.clear(); 943 m_GlyphMap.clear();
941 } 944 }
945
942 #define CONTRAST_RAMP_STEP 1 946 #define CONTRAST_RAMP_STEP 1
943 void CFX_Font::AdjustMMParams(int glyph_index, int dest_width, int weight) { 947 void CFX_Font::AdjustMMParams(int glyph_index, int dest_width, int weight) {
944 FXFT_MM_Var pMasters = nullptr; 948 FXFT_MM_Var pMasters = nullptr;
945 FXFT_Get_MM_Var(m_Face, &pMasters); 949 FXFT_Get_MM_Var(m_Face, &pMasters);
946 if (!pMasters) { 950 if (!pMasters) {
947 return; 951 return;
948 } 952 }
949 long coords[2]; 953 long coords[2];
950 if (weight == 0) { 954 if (weight == 0) {
951 coords[0] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 0)) / 65536; 955 coords[0] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 0)) / 65536;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 void _CFX_UniqueKeyGen::Generate(int count, ...) { 1437 void _CFX_UniqueKeyGen::Generate(int count, ...) {
1434 va_list argList; 1438 va_list argList;
1435 va_start(argList, count); 1439 va_start(argList, count);
1436 for (int i = 0; i < count; i++) { 1440 for (int i = 0; i < count; i++) {
1437 int p = va_arg(argList, int); 1441 int p = va_arg(argList, int);
1438 ((uint32_t*)m_Key)[i] = p; 1442 ((uint32_t*)m_Key)[i] = p;
1439 } 1443 }
1440 va_end(argList); 1444 va_end(argList);
1441 m_KeyLen = count * sizeof(uint32_t); 1445 m_KeyLen = count * sizeof(uint32_t);
1442 } 1446 }
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_path.cpp ('k') | core/fxge/ge/fx_text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698