diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-06 18:14:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-07 10:19:32 +0000 |
commit | 00659bcdbbb167596e6fd18e283a54819dd6fe91 (patch) | |
tree | 65316f99002c5aa6851ee1770df557b789772f20 /vcl/unx | |
parent | 545ddfbaa98cfeaa35c95d7db7b16cd241cedc89 (diff) |
improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states
So
(1) use more useful names
(2) combine the two parameters into one enum
Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/cairo_xlib_cairo.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkcairo.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx index ede009f7f914..3e563d206619 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx @@ -250,7 +250,7 @@ namespace cairo return VclPtr<VirtualDevice>::Create(aSystemGraphicsData, Size(width, height), - DeviceFormat::DEFAULT); + DeviceFormat::WITHOUT_ALPHA); } /** diff --git a/vcl/unx/gtk3/gtkcairo.cxx b/vcl/unx/gtk3/gtkcairo.cxx index b77711384ac2..f389f4d087c1 100644 --- a/vcl/unx/gtk3/gtkcairo.cxx +++ b/vcl/unx/gtk3/gtkcairo.cxx @@ -122,7 +122,7 @@ namespace cairo return VclPtr<VirtualDevice>::Create(aSystemGraphicsData, get_surface_size(mpSurface.get()), - DeviceFormat::DEFAULT); + DeviceFormat::WITHOUT_ALPHA); } } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 925c8669be78..6b8b65c4fbce 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -4483,7 +4483,7 @@ public: gtk_container_resize_children(GTK_CONTAINER(m_pWidget)); #endif - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); xOutput->SetOutputSizePixel(aSize); switch (rOutput.GetOutDevType()) @@ -6543,7 +6543,7 @@ public: #endif } - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); xOutput->SetOutputSizePixel(get_size()); cairo_surface_t* pSurface = get_underlying_cairo_surface(*xOutput); cairo_t* cr = cairo_create(pSurface); @@ -18352,7 +18352,7 @@ public: #if !GTK_CHECK_VERSION(4, 0, 0) , m_pAccessible(nullptr) #endif - , m_xDevice(DeviceFormat::DEFAULT) + , m_xDevice(DeviceFormat::WITHOUT_ALPHA) , m_pSurface(nullptr) , m_nQueryTooltip(g_signal_connect(m_pDrawingArea, "query-tooltip", G_CALLBACK(signalQueryTooltip), this)) #if !GTK_CHECK_VERSION(4, 0, 0) |