summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-01 11:51:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-01 13:07:33 +0000
commit6ca077ee7156123ec38a6cfdde7168749589d0ff (patch)
tree9701a7ffc85dc58f3af1aebc35427263cc9be7e1 /cppcanvas
parent6e8c67580974484c790f52991de26298ce8e7e1c (diff)
no need to allocate Gradient separately
it is only one pointer big Change-Id: I21afdeb8015c658c7b9d5db24bceeb8e43694272 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148038 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx2
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.hxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 1fef9c48cce7..e1b4476b62ee 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2409,7 +2409,7 @@ namespace cppcanvas::internal
// TODO(P2): Use native canvas gradients here (saves a lot of UNO calls)
internal::GradientAutoPtr pGradient(
- new Gradient( pAct->GetGradient() ) );
+ pAct->GetGradient() );
DBG_TESTSOLARMUTEX();
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
index f863d18ed4c7..eb2419bbf53f 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <cppcanvas/canvas.hxx>
+#include <vcl/gradient.hxx>
#include <action.hxx>
#include <memory>
@@ -30,7 +31,6 @@ namespace basegfx {
}
class GDIMetaFile;
-class Gradient;
/* Definition of internal::TransparencyGroupActionFactory */
@@ -40,7 +40,7 @@ namespace cppcanvas::internal
struct OutDevState;
typedef std::unique_ptr< GDIMetaFile > MtfAutoPtr;
- typedef std::unique_ptr< Gradient > GradientAutoPtr;
+ typedef std::optional< Gradient > GradientAutoPtr;
/** Transparency group action.