diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-16 13:51:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-16 17:32:56 +0200 |
commit | 46b3a2401d371b20bdbfca6a47c09408259d595f (patch) | |
tree | f89d3f274688d66c8a92249de5130dfe2ee73ded /include | |
parent | a518d1acf7f2f9952ab1d20f3185615351655ef8 (diff) |
vcl: support pre-computed glyph items in OutputDevice::ImplLayout()
This allows using the SalLayoutGlyphs obtained from
GenericSalLayout::GetGlyphs() to return early in
GenericSalLayout::LayoutText().
Change-Id: If3a004f983f3578915786668bfcada00227d2eeb
Reviewed-on: https://gerrit.libreoffice.org/59169
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/outdev.hxx | 5 | ||||
-rw-r--r-- | include/vcl/vcllayout.hxx | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index fe9af36994b8..6a91fd2527e8 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -150,6 +150,8 @@ namespace o3tl } typedef std::vector< tools::Rectangle > MetricVector; +struct GlyphItem; +typedef std::vector<GlyphItem> SalLayoutGlyphs; // OutputDevice-Types @@ -1328,7 +1330,8 @@ public: ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen, const Point& rLogicPos = Point(0,0), long nLogicWidth=0, const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE, - vcl::TextLayoutCache const* = nullptr) const; + vcl::TextLayoutCache const* = nullptr, + const SalLayoutGlyphs* pGlyphs = nullptr) const; SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen, DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray, SalLayoutFlags flags = SalLayoutFlags::NONE, diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx index ac61892fb415..735dc4cf748f 100644 --- a/include/vcl/vcllayout.hxx +++ b/include/vcl/vcllayout.hxx @@ -131,7 +131,7 @@ public: const Point& DrawOffset() const { return maDrawOffset; } Point GetDrawPosition( const Point& rRelative = Point(0,0) ) const; - virtual bool LayoutText( ImplLayoutArgs& ) = 0; // first step of layouting + virtual bool LayoutText( ImplLayoutArgs&, const SalLayoutGlyphs* ) = 0; // first step of layouting virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting after fallback etc. virtual void InitFont() const {} virtual void DrawText( SalGraphics& ) const = 0; |