diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-17 13:03:23 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-05-16 14:56:56 +0200 |
commit | 8dabcecd6cc371d5ad030b7e7793dc863b18a26b (patch) | |
tree | 22d17d9c09a3da810eb113cc2ff5b4e1387b81c9 /vcl/unx/gtk/app/gtkinst.cxx | |
parent | c5f401b762f90718995ec5d8503b1db0ab6c43ad (diff) |
establish that Virtual Devices either match Physical Device depth or ...
are 1 or (rarely) 8 bit and lock that down.
Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
Diffstat (limited to 'vcl/unx/gtk/app/gtkinst.cxx')
-rw-r--r-- | vcl/unx/gtk/app/gtkinst.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 601fd2152d1d..00a92618987a 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -317,23 +317,20 @@ void GtkYieldMutex::ThreadsLeave() SalVirtualDevice* GtkInstance::CreateVirtualDevice( SalGraphics *pG, long &nDX, long &nDY, - sal_uInt16 nBitCount, + DeviceFormat eFormat, const SystemGraphicsData *pGd ) { EnsureInit(); #if GTK_CHECK_VERSION(3,0,0) (void)pG; (void) pGd; - SvpSalVirtualDevice* pNew = new SvpSalVirtualDevice( nBitCount ); + SvpSalVirtualDevice* pNew = new SvpSalVirtualDevice(eFormat); pNew->SetSize( nDX, nDY ); return pNew; #else GtkSalGraphics *pGtkSalGraphics = dynamic_cast<GtkSalGraphics*>(pG); - - GtkSalGraphics *pNewGraphics = NULL; - if (pGtkSalGraphics) - pNewGraphics = new GtkSalGraphics(pGtkSalGraphics->GetGtkFrame(), pGtkSalGraphics->GetGtkWidget()); - - return CreateX11VirtualDevice(pG, nDX, nDY, nBitCount, pGd, pNewGraphics); + assert(pGtkSalGraphics); + return CreateX11VirtualDevice(pG, nDX, nDY, eFormat, pGd, + new GtkSalGraphics(pGtkSalGraphics->GetGtkFrame(), pGtkSalGraphics->GetGtkWidget())); #endif } |