diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-02-15 19:51:04 +1100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-28 10:59:19 -0600 |
commit | d12324d13620e5acda63b1b0c21731fecc49aa01 (patch) | |
tree | 4321d783d46672513abaff9371a4b4138f9fd98e /vcl/inc/unx | |
parent | 1ec2880679d88c89901ce00fe30dd78e584f6960 (diff) |
Rename GetGraphics to AcquireGraphics
Currently there are a number of classes that have a function called
GetGraphics(). It returns a SalGraphics instance if one is available
for the sole use of the caller. Some variants keep a pool of available
SalGraphics and return one not currently in use by anyone, creating
extra ones on demand, sometimes up to a set limit and returning NULL
on reaching that limit of simultaneously in use SalGraphics.
This is confusing. What is really happening from the perspective of the calling
is that is that we are attempting to *acquire* ownership of a SalGraphics
instance.
Therefore, rename GetGraphics to AcquireGraphics() which returns a handle to a
SalGraphics if we can acquire a free graphics instance, and NULL if we cannot,
which makes it cleared that ReleaseGraphics should be called on the result
of AcquireGraphics.
The classes that were changed to include the new acquire function are:
* SalFrame
* SalVirtualDevice
* SalInfoPrinter
* PspSalInfoPrinter
* X11SalFrame
* X11SalVirtualDevice
* GtkSalFrame
* KDESalFrame
* TDESalFrame
* WinSalFrame
* WinSalInfoPrinter
* WinSalVirtualDevice
* SvpSalFrame
* SvpSalVirtualDevice
* AquaSalFrame
* AquaSalInfoPrinter
* AquaSalVirtualDevice
Change-Id: Ic39c08a4bcaf665ae08ba2808cd03b0e80790c46
Reviewed-on: https://gerrit.libreoffice.org/8070
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r-- | vcl/inc/unx/gtk/gtkframe.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/kde/kdedata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/salframe.h | 2 | ||||
-rw-r--r-- | vcl/inc/unx/salvd.h | 2 | ||||
-rw-r--r-- | vcl/inc/unx/tde/tdedata.hxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 82cee5d47804..76a8ec5f83b4 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -351,7 +351,7 @@ public: // SalGraphics or NULL, but two Graphics for all SalFrames // must be returned - virtual SalGraphics* GetGraphics(); + virtual SalGraphics* AcquireGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); // Event must be destroyed, when Frame is destroyed diff --git a/vcl/inc/unx/kde/kdedata.hxx b/vcl/inc/unx/kde/kdedata.hxx index 0b8afea6d926..53537afd66db 100644 --- a/vcl/inc/unx/kde/kdedata.hxx +++ b/vcl/inc/unx/kde/kdedata.hxx @@ -62,7 +62,7 @@ public: KDESalFrame( SalFrame* pParent, sal_uLong ); virtual ~KDESalFrame(); - virtual SalGraphics* GetGraphics(); + virtual SalGraphics* AcquireGraphics(); virtual void ReleaseGraphics( SalGraphics *pGraphics ); virtual void updateGraphics( bool bClear ); virtual void UpdateSettings( AllSettings& rSettings ); diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index e5f41264158d..931764170861 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -210,7 +210,7 @@ public: bool appendUnicodeSequence( sal_Unicode ); bool endUnicodeSequence(); - virtual SalGraphics* GetGraphics(); + virtual SalGraphics* AcquireGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); // call with true to clear graphics (setting None as drawable) diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h index b1210b3a5243..b50dd087dd39 100644 --- a/vcl/inc/unx/salvd.h +++ b/vcl/inc/unx/salvd.h @@ -76,7 +76,7 @@ public: int GetHeight() const { return nDY_; } SalX11Screen GetXScreenNumber() const { return m_nXScreen; } - virtual SalGraphics* GetGraphics(); + virtual SalGraphics* AcquireGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); // Set new size, without saving the old contents diff --git a/vcl/inc/unx/tde/tdedata.hxx b/vcl/inc/unx/tde/tdedata.hxx index 940947b40c90..bc937765cb5f 100644 --- a/vcl/inc/unx/tde/tdedata.hxx +++ b/vcl/inc/unx/tde/tdedata.hxx @@ -72,7 +72,7 @@ public: TDESalFrame( SalFrame* pParent, sal_uLong ); virtual ~TDESalFrame(); - virtual SalGraphics* GetGraphics(); + virtual SalGraphics* AcquireGraphics(); virtual void ReleaseGraphics( SalGraphics *pGraphics ); virtual void updateGraphics( bool bClear ); virtual void UpdateSettings( AllSettings& rSettings ); |