https://bugs.documentfoundation.org/show_bug.cgi?id=97975

            Bug ID: 97975
           Summary: OpenGL: theme / widget cache ...
           Product: LibreOffice
           Version: 5.1.1.1 rc
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: graphics stack
          Assignee: [email protected]
          Reporter: [email protected]

The OpenGL code has a nice cache for storing transparent OS rendered themed
elements. Unfortunately the keys used to lookup items in this cache do not
contain all of the necessary information:

Checkout:

git grep ControlCacheKey

The problem is that the drawNativeControl methods (eg. in WinSalGraphics) -
takes an ImplControlValue parameter. This parameter can have a ton of state
rammed into it (checkout the sub-classes in include/vcl/salnativewidgets.hxx).
While the cache is keyed on one 16bit ControlState parameter - in fact some
controls have multiple child controls with different states =)

Take for example a CTRL_SPINBOX - it has two sub-buttons, each with a different
state - checkout SpinButtonValue - which has an mnUpperState and an
mnLowerState.

This explains the FIXME: in the salnativewidgets.hxx - "these guys have complex
hidden state" ...

Ignoring that state then breaks things like eg. mouse-over of a spin-buttons'
"up" button doing a nice pre-light of that control etc. since it is
indistinguishable in the cache.

So - in order to re-enable a number of these via mending 'canCacheControl' - 
and improving rendering performance - we need to include the ImplControlValue
(and its comparison into sub-classes) into the ControlCacheKey. How best to do
that is not particularly clear - perhaps getting a 'virtual sal_uInt64
getExtraState();' to the base-class, and then combining the ControlStates into
that (not many bits are truly used in that so it should fit). It should only be
necessary to combine the various states into that guy.

So - adding a new sal_uInt64 to the ControlCacheKey and populating it from a
new virtual method in every ImplControlValue sub-class, and then re-enabling
CTRL_TABITEMS, CTRL_SPINBUTTONS, and CTRL_SPINBOX's caching ? in 'bool
canCacheControl'

Does that look sensible ?

Thanks !

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to