diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-02 22:47:50 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-02 23:25:32 +0900 |
commit | 54962518fa2ca3860fcb4d2c772dea21b22a184e (patch) | |
tree | da43df4e2a71411af3617320a9d64f49ebcdeac3 /include | |
parent | 26e84b3852bbb9585fab76e8d3dba5dcd77f0357 (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
Diffstat (limited to 'include')
-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 2ae7a6e26c19..8e9effbe6a72 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 |