diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-02 22:47:50 +0900 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-18 10:10:06 +0200 |
commit | 3d0d6680ad2a80f2df9f39d89312cec67c164dbc (patch) | |
tree | 741f4965cd23756520e7af94530be15d888bbeef /include/vcl | |
parent | a31a07783502c891b2b17ea3adfa030ad37bd7d2 (diff) |
tdf#93859 opengl - don't cache radiobuttons, refactor code dupl.
Radio buttons and check boxes can't be cached with current
framework as they have an additional rendering state provided in
additional data.
Refactor code to control which controls can be cached in one place
only.
Change-Id: I095a01cbf5dde013247d70ada89020f64c8c6510
(cherry picked from commit 54962518fa2ca3860fcb4d2c772dea21b22a184e)
Reviewed-on: https://gerrit.libreoffice.org/18271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/salnativewidgets.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index 9692a80cbab8..fb128d380d4e 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -279,6 +279,19 @@ public: && maSize.Width() == aOther.maSize.Width() && maSize.Height() == aOther.maSize.Height(); } + + bool canCacheControl() + { + switch(mnType) + { + case CTRL_CHECKBOX: + case CTRL_RADIOBUTTON: + return false; + default: + break; + } + return true; + } }; struct ControlCacheHashFunction |