diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-10-31 11:47:18 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:13 +0100 |
commit | 31b2c10484fc265ff0f05ce405c2ed5b982f8714 (patch) | |
tree | c2417156e30bff34610ca49943a73794d21adea4 /vcl/opengl | |
parent | 840f55c0f6e21d00b51e4a52824c7eb7f938122f (diff) |
implement Skia native controls drawing/caching for Windows
This actually fixes a number of drawing problems (e.g. highlight
in popup menus), it seems the other code path is buggy.
Change-Id: Iea697f577d08d20e338224d5ff5b3bf7b653f8d1
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/win/gdiimpl.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index bb6e5bf0a16c..c47de25b19f3 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -746,14 +746,14 @@ void WinOpenGLSalGraphicsImpl::Init() OpenGLSalGraphicsImpl::Init(); } -TheTextureCache::TheTextureCache(): cache(200) {} +OpenGLControlsCache::OpenGLControlsCache(): cache(200) {} -ControlCacheType & TheTextureCache::get() { +OpenGLControlCacheType & OpenGLControlsCache::get() { SalData * data = GetSalData(); - if (!data->m_pTextureCache) { - data->m_pTextureCache.reset(new TheTextureCache); + if (!data->m_pOpenGLControlsCache) { + data->m_pOpenGLControlsCache.reset(new OpenGLControlsCache); } - return data->m_pTextureCache->cache; + return data->m_pOpenGLControlsCache->cache; } OpenGLCompatibleDC::OpenGLCompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height) @@ -794,8 +794,8 @@ bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey cons if (!gbCacheEnabled) return false; - auto & gTextureCache = TheTextureCache::get(); - ControlCacheType::const_iterator iterator = gTextureCache.find(rControlCacheKey); + auto & gTextureCache = OpenGLControlsCache::get(); + OpenGLControlCacheType::const_iterator iterator = gTextureCache.find(rControlCacheKey); if (iterator == gTextureCache.end()) return false; @@ -857,8 +857,8 @@ bool WinOpenGLSalGraphicsImpl::RenderAndCacheNativeControl(CompatibleDC& rWhite, if (!aControlCacheKey.canCacheControl()) return true; - ControlCachePair pair(aControlCacheKey, std::move(pCombo)); - TheTextureCache::get().insert(std::move(pair)); + OpenGLControlCachePair pair(aControlCacheKey, std::move(pCombo)); + OpenGLControlsCache::get().insert(std::move(pair)); return bResult; } |