include/vcl/outdev.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 11ca83d180aa37f927f341cdc1726ff1491fcc49 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Fri Feb 14 01:36:30 2014 +1100 Update the documentation for ImplInitGraphics() Better explain the whys and wherefores of the graphics LRU and how it is used. Change-Id: I345cd91044bc533c9650e2d17bf53d2879af3e39 Reviewed-on: https://gerrit.libreoffice.org/8030 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 9b012cc..8595400 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -368,6 +368,21 @@ public: /** Initialize the graphics device that the output device uses to draw on. + There is an LRU of OutputDevices that is used to get the graphics. The + actual creation of a SalGraphics instance is done via the SalFrame + implementation. + + However, the SalFrame instance will only return a valid SalGraphics + instance if it is not in use or there wasn't one in the first place. When + this happens, ImplInitGraphics finds the least recently used OutputDevice + in a different frame and "steals" it (releases it then starts using it). + + If there are no frames to steal an OutputDevice's SalGraphics instance from + then it blocks until the graphics is released. + + Once it has acquired a graphics instance, then we add the OutputDevice to + the LRU. + @returns true if was able to initialize the graphics device, false otherwise. */ SAL_DLLPRIVATE bool ImplInitGraphics() const;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits