summaryrefslogtreecommitdiff
path: root/vcl/quartz/CTRunData.hxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-04-07 02:01:39 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-04-09 16:33:06 +0000
commitb8aa1f23645bbe81093ff436b82a58766f3157af (patch)
treebdd2146c9a1e5ed0f74946228699380bb4eae03d /vcl/quartz/CTRunData.hxx
parent8facc14e88251d9356995d9e8e213084212e88a5 (diff)
vcl quartz: cache per-run glyphs information
GetNextGlyphs could only deal with 1 glyph at the time and was recalculing a lot of thing while iterating on the glyphs This is not just a performance issue.. the notiong of keeping per run glyphs information will be useful to re-establish the proper support of glyphs display positionning by SetDXArray() which today is completely ignored, in favor or letting CoreText spread the extra free space itself. Change-Id: Ib267c3e490619b650d4149f4b15b5758802942ba Reviewed-on: https://gerrit.libreoffice.org/8879 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl/quartz/CTRunData.hxx')
-rw-r--r--vcl/quartz/CTRunData.hxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/vcl/quartz/CTRunData.hxx b/vcl/quartz/CTRunData.hxx
new file mode 100644
index 000000000000..2fb1912cebc0
--- /dev/null
+++ b/vcl/quartz/CTRunData.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef CTRunData_Included
+#define CTRunData_Included
+
+#include "premac.h"
+#include <CoreGraphics/CoreGraphics.h>
+#include <CoreText/CoreText.h>
+#include "postmac.h"
+
+class CTRunData
+{
+public:
+ int ownership_flags;
+#define CTRUNDATA_F_OWN_ADVANCES (1<<0)
+#define CTRUNDATA_F_OWN_GLYPHS (1<<1)
+#define CTRUNDATA_F_OWN_INDICES (1<<2)
+#define CTRUNDATA_F_OWN_POSITIONS (1<<3)
+
+ int m_nGlyphs;
+ int m_StartPos;
+ int m_EndPos;
+ CTRunRef m_pRun;
+ CTFontRef m_pFont;
+ const CGGlyph* m_pGlyphs;
+ const CGPoint* m_pPositions;
+ const CGSize* m_pAdvances;
+ const CFIndex* m_pStringIndices;
+
+ CTRunData(CTRunRef pRun, int start);
+ ~CTRunData(void);
+};
+
+#endif /* NDef CTRunData_Included */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */