summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-04-23 00:57:50 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-04-23 07:23:42 +1000
commit665bc42d7504c3896a485c8bab17b8eff7d119df (patch)
tree736a10aaf3a5a2cc2bf51d02763309222b2ec190
parent704e5abbe99b41859bb02d816ea1dc439180a5f6 (diff)
Rename VCL's ImplInitGraphics to AcquireGraphics
Turns out, we don't try to initialize a graphics context, much less *acquire* one. e.g. Window instances can have many frames (subwindows), of which one some are really being used at any time so we try to "steal" one of the graphics contexts from the frame to use ourself, later on that frame will steal it from someone else, etc. Change-Id: I66d5dbb7015301bc2d2be51627061c91e1f2ee5d
-rw-r--r--include/vcl/outdev.hxx6
-rw-r--r--include/vcl/print.hxx2
-rw-r--r--include/vcl/virdev.hxx2
-rw-r--r--include/vcl/window.hxx2
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/outdev/clipping.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx4
-rw-r--r--vcl/source/window/window.cxx2
9 files changed, 12 insertions, 12 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 990c47a1471e..defa3dd367d3 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -404,7 +404,7 @@ public:
SAL_DLLPRIVATE SalGraphics const *ImplGetGraphics() const;
SAL_DLLPRIVATE SalGraphics* ImplGetGraphics();
- /** Initialize the graphics device that the output device uses to draw on.
+ /** Acquire a 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
@@ -412,7 +412,7 @@ public:
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
+ this happens, AcquireGraphics 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
@@ -423,7 +423,7 @@ public:
@returns true if was able to initialize the graphics device, false otherwise.
*/
- virtual bool ImplInitGraphics() const = 0;
+ virtual bool AcquireGraphics() const = 0;
/** Release the graphics device, and remove it from the graphics device
list.
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index b02f739d4451..58651d520027 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -230,7 +230,7 @@ private:
bool mbIsQueuePrinter;
Link maErrorHdl;
- bool ImplInitGraphics() const SAL_OVERRIDE;
+ bool AcquireGraphics() const SAL_OVERRIDE;
void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
void ImplReleaseFonts() SAL_OVERRIDE;
SAL_DLLPRIVATE void ImplInitData();
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 072b94d55352..6b1af90a0b45 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -61,7 +61,7 @@ private:
SAL_DLLPRIVATE bool ForceZeroExtleadBug() const
{ return ((meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD) != 0); }
public:
- bool ImplInitGraphics() const SAL_OVERRIDE;
+ bool AcquireGraphics() const SAL_OVERRIDE;
void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
public:
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 25063dc957d6..d8d88558ae5f 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -375,7 +375,7 @@ private:
friend Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
public:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData );
- bool ImplInitGraphics() const SAL_OVERRIDE;
+ bool AcquireGraphics() const SAL_OVERRIDE;
void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId );
SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader( const ResId& rResId );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 5b571d9ea6ab..f017ee602d65 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -574,7 +574,7 @@ void Printer::ImplInitData()
pSVData->maGDIData.mpFirstPrinter = this;
}
-bool Printer::ImplInitGraphics() const
+bool Printer::AcquireGraphics() const
{
DBG_TESTSOLARMUTEX();
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index be348ec25fd9..17926b8e449c 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -34,7 +34,7 @@
using namespace ::com::sun::star::uno;
-bool VirtualDevice::ImplInitGraphics() const
+bool VirtualDevice::AcquireGraphics() const
{
DBG_TESTSOLARMUTEX();
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index 7da815272be2..257bd581aecf 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -74,7 +74,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
if( !pGraphics )
{
if( !mpGraphics )
- if( !ImplInitGraphics() )
+ if( !AcquireGraphics() )
return false;
pGraphics = mpGraphics;
}
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 4cfbad8e0cf1..56c27ca892d7 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -382,7 +382,7 @@ SalGraphics* OutputDevice::ImplGetGraphics()
if ( !mpGraphics )
{
- if ( !ImplInitGraphics() )
+ if ( !AcquireGraphics() )
{
SAL_WARN("vcl", "No mpGraphics set");
}
@@ -397,7 +397,7 @@ SalGraphics const *OutputDevice::ImplGetGraphics() const
if ( !mpGraphics )
{
- if ( !ImplInitGraphics() )
+ if ( !AcquireGraphics() )
{
SAL_WARN("vcl", "No mpGraphics set");
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index eccb70e1720d..d44b2fd3c868 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -339,7 +339,7 @@ const char* ImplDbgCheckWindow( const void* pObj )
}
#endif
-bool Window::ImplInitGraphics() const
+bool Window::AcquireGraphics() const
{
DBG_TESTSOLARMUTEX();