diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-10-25 16:29:49 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:12 +0100 |
commit | 5ac9a62f3a354db80837bdd1c95b763989b303bb (patch) | |
tree | 94a5bd6875589fa3827c20b84a5edee9da60090b /vcl/inc/opengl | |
parent | aa08385d1a07c530d32de91b633dbe087a3848ba (diff) |
fix Skia Windows text rendering
There are two cases in WinSalGraphics::DrawTextLayout(), with and
without cached glyphs:
- Cached case DeferredTextDraw() gets data as BGRA with the glyph
drawn in white, it just needs to be modulated to the proper color
and drawn.
- Uncached case DrawTextMask() gets data as BGRA with A invalid,
it must be used as mask for the color to drawn, but without
the inverse alpha VCL idiosyncracy that DrawMask() handles.
Change-Id: I05dcec994df68d5986cd85cffa42a8f9f23c42c4
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r-- | vcl/inc/opengl/win/gdiimpl.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx index 02b8b3850cab..2130654a3951 100644 --- a/vcl/inc/opengl/win/gdiimpl.hxx +++ b/vcl/inc/opengl/win/gdiimpl.hxx @@ -26,8 +26,8 @@ class OpenGLCompatibleDC : public CompatibleDC public: OpenGLCompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height); - virtual std::unique_ptr<Texture> getTexture() override; - // overload, caller must delete + virtual std::unique_ptr<Texture> getAsMaskTexture() override; + // caller must delete OpenGLTexture* getOpenGLTexture(); virtual bool copyToTexture(Texture& aTexture) override; @@ -68,7 +68,7 @@ public: virtual bool UseTextDraw() const override { return true; } virtual void PreDrawText() override; virtual void PostDrawText() override; - virtual void DrawMask( CompatibleDC::Texture* rTexture, Color nMaskColor, const SalTwoRect& rPosAry ) override; + virtual void DrawTextMask( CompatibleDC::Texture* rTexture, Color nMaskColor, const SalTwoRect& rPosAry ) override; using OpenGLSalGraphicsImpl::DrawMask; virtual void DeferredTextDraw(const CompatibleDC::Texture* pTexture, Color nMaskColor, const SalTwoRect& rPosAry) override; |