summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorNicolás Peña <npm@chromium.org>2017-03-23 14:31:11 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-03-23 14:43:07 +0000
commit4650ded3dccefca89b4ef4757bae49a21b4a786d (patch)
tree4bb47204c8864a568c29c6ffb3982499547ddc4c /core/fxge/apple
parentcdba747a53082a7f36534dffa6a3ad01628e53c3 (diff)
downloadpdfium-4650ded3dccefca89b4ef4757bae49a21b4a786d.tar.xz
Revert "Remove CFX_FixedBufGrow"
This reverts commit 55d1d0191ea8316df32858d8cc62fb7c620e8613. Reason for revert: Slowing down corpus tests by a lot on Mac/Win Original change's description: > Remove CFX_FixedBufGrow > > This Cl replaces the CFX_FixedBufGrow class with std::vector. > > Change-Id: I85c85b7a8de4794840b561e09841bb464cfa9dfe > Reviewed-on: https://pdfium-review.googlesource.com/3138 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: dsinclair <dsinclair@chromium.org> > TBR=tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Iaee27570f140b2033b5d8fb8f3077fc839558d64 Reviewed-on: https://pdfium-review.googlesource.com/3158 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_apple_platform.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index 33e675c0a8..20e86ed483 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -4,9 +4,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include <algorithm>
-#include <vector>
-
#include "core/fxcrt/fx_system.h"
#ifndef _SKIA_SUPPORT_
@@ -58,8 +55,8 @@ bool CGDrawGlyphRun(CGContextRef pContext,
if (!pFont->GetPlatformFont())
return false;
}
- std::vector<uint16_t> glyph_indices(std::max(32, nChars));
- std::vector<CGPoint> glyph_positions(std::max(32, nChars));
+ CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
+ CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
for (int i = 0; i < nChars; i++) {
glyph_indices[i] =
pCharPos[i].m_ExtGID ? pCharPos[i].m_ExtGID : pCharPos[i].m_GlyphIndex;
@@ -77,9 +74,9 @@ bool CGDrawGlyphRun(CGContextRef pContext,
new_matrix.d = -new_matrix.d;
}
quartz2d.setGraphicsTextMatrix(pContext, &new_matrix);
- return quartz2d.drawGraphicsString(
- pContext, pFont->GetPlatformFont(), font_size, glyph_indices.data(),
- glyph_positions.data(), nChars, argb, nullptr);
+ return quartz2d.drawGraphicsString(pContext, pFont->GetPlatformFont(),
+ font_size, glyph_indices, glyph_positions,
+ nChars, argb, nullptr);
}
} // namespace