Arbitrary Slate geometry: DrawRenderThread not called

I am trying to draw arbitrary geometry within a SLeaf/SCompoundWidget.

Realizing that very litle is available beside boxes and lines (!!!), I borrowed the pattern found in: SGraphNodeMaterialBase.cpp.
The node uses FSlateDrawElement::MakeCustom to display a material (in my case, it would be 2d geometry).

Thing is, I got nothing but a black square where the SViewport widget is supposed to be.

The ISlateViewport::OnDrawViewport → BeginRenderingCanvas sequence is correctly called for each render loop but DrawRenderThread is never triggered (see code below).
Looking at the engine code, it looks the renderer thinks my canvas is invalid (???).
What is the trick to get MakeCustom work within a Slate widget?

Note: I know AHUD does provide access to a UCanvas, but then I’d loose the nice layout management of Slate :[

/**
* Simple representation of the backbuffer that the debug canvas renders to
* This class may only be accessed from the render thread
*/
class FSlateCanvasRenderTarget : public FRenderTarget
{
public:
	/** FRenderTarget interface */
	virtual FIntPoint GetSizeXY() const
	{
		return ClippingRect.Size();
	}

	/** Sets the texture that this target renders to */
	void SetRenderTargetTexture(FTexture2DRHIRef& InRHIRef)
	{
		RenderTargetTextureRHI = InRHIRef;
	}

	/** Clears the render target texture */
	void ClearRenderTargetTexture()
	{
		RenderTargetTextureRHI.SafeRelease();
	}

	/** Sets the viewport rect for the render target */
	void SetViewRect(const FIntRect& InViewRect)
	{
		ViewRect = InViewRect;
	}

	/** Gets the viewport rect for the render target */
	const FIntRect& GetViewRect() const
	{
		return ViewRect;
	}

	/** Sets the clipping rect for the render target */
	void SetClippingRect(const FIntRect& InClippingRect)
	{
		ClippingRect = InClippingRect;
	}

	/** Gets the clipping rect for the render target */
	const FIntRect& GetClippingRect() const
	{
		return ClippingRect;
	}
private:
	FIntRect ViewRect;
	FIntRect ClippingRect;
};

/* --------------------FPreviewViewport-------------------------- */
FSlateViewport::FSlateViewport()
	: Drawer(new FCanvasDrawer)
{
}

FSlateViewport::~FSlateViewport()
{
	// Pass the preview element to the render thread so that it's deleted after it's shown for the last time
	ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER
		(
		SafeDeletePreviewElement,
		FThreadSafeFCanvasDrawerPtr, PreviewElementPtr, Drawer,
		{
			PreviewElementPtr.Reset();
		}
	);
}

void FSlateViewport::OnDrawViewport(const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, class FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled)
{
	FSlateRect SlateCanvasRect = AllottedGeometry.GetClippingRect();
	FSlateRect ClippedCanvasRect = SlateCanvasRect.IntersectionWith(MyClippingRect);

	FIntRect CanvasRect(
		FMath::TruncToInt(FMath::Max(0.0f, SlateCanvasRect.Left)),
		FMath::TruncToInt(FMath::Max(0.0f, SlateCanvasRect.Top)),
		FMath::TruncToInt(FMath::Max(0.0f, SlateCanvasRect.Right)),
		FMath::TruncToInt(FMath::Max(0.0f, SlateCanvasRect.Bottom)));

	FIntRect ClippingRect(
		FMath::TruncToInt(FMath::Max(0.0f, ClippedCanvasRect.Left)),
		FMath::TruncToInt(FMath::Max(0.0f, ClippedCanvasRect.Top)),
		FMath::TruncToInt(FMath::Max(0.0f, ClippedCanvasRect.Right)),
		FMath::TruncToInt(FMath::Max(0.0f, ClippedCanvasRect.Bottom)));

	// ???
	bool bIsRealtime = true;

	if (Drawer->BeginRenderingCanvas(CanvasRect, ClippingRect, bIsRealtime))
	{
		// Draw above everything else
		uint32 TopLayer = LayerId + 1;
		FSlateDrawElement::MakeCustom(OutDrawElements, TopLayer, Drawer);
	}
}

FIntPoint FSlateViewport::GetSize() const
{
	return FIntPoint(64, 64);
}

/* --------------------FCanvasDrawer-------------------------- */
FCanvasDrawer::FCanvasDrawer()
	: RenderTarget(new FSlateCanvasRenderTarget)
	, bIsRealtime(false)
{
}

FCanvasDrawer::~FCanvasDrawer()
{
	delete RenderTarget;
}

bool FCanvasDrawer::BeginRenderingCanvas(const FIntRect& InCanvasRect, const FIntRect& InClippingRect, bool bInIsRealtime)
{
	if (InCanvasRect.Size().X > 0 && InCanvasRect.Size().Y > 0 && InClippingRect.Size().X > 0 && InClippingRect.Size().Y > 0)
	{
		/**
		* Struct to contain all info that needs to be passed to the render thread
		*/
		struct FRenderInfo
		{
			/** Size of the Canvas tile */
			FIntRect CanvasRect;
			/** How to clip the canvas tile */
			FIntRect ClippingRect;
			/** Whether preview is using realtime values */
			bool bIsRealtime;
		};

		FRenderInfo RenderInfo;
		RenderInfo.CanvasRect = InCanvasRect;
		RenderInfo.ClippingRect = InClippingRect;
		RenderInfo.bIsRealtime = bInIsRealtime;

		ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER
			(
			BeginRenderingCanvas,
			FCanvasDrawer*, CanvasDrawer, this,
			FRenderInfo, InRenderInfo, RenderInfo,
			{
				CanvasDrawer->RenderTarget->SetViewRect(InRenderInfo.CanvasRect);
				CanvasDrawer->RenderTarget->SetClippingRect(InRenderInfo.ClippingRect);
				CanvasDrawer->bIsRealtime = InRenderInfo.bIsRealtime;
			}
		);
		return true;
	}

	return false;
}

void FCanvasDrawer::DrawRenderThread(FRHICommandListImmediate& RHICmdList, const void* InWindowBackBuffer)
{
	UE_LOG(LogTemp, Log, TEXT("FCanvasDrawer::DrawRenderThread"));

	// Clip the canvas to avoid having to set UV values
	FIntRect ClippingRect = RenderTarget->GetClippingRect();

	RHICmdList.SetScissorRect(true,
		ClippingRect.Min.X,
		ClippingRect.Min.Y,
		ClippingRect.Max.X,
		ClippingRect.Max.Y);
	RenderTarget->SetRenderTargetTexture(*(FTexture2DRHIRef*)InWindowBackBuffer);
	{
		// Check realtime mode for whether to pass current time to canvas
		float CurrentTime = bIsRealtime ? (FApp::GetCurrentTime() - GStartTime) : 0.0f;
		float DeltaTime = bIsRealtime ? FApp::GetDeltaTime() : 0.0f;

		FCanvas Canvas(RenderTarget, NULL, CurrentTime, CurrentTime, DeltaTime, GMaxRHIFeatureLevel);
		{
			Canvas.SetAllowedModes(0);
			Canvas.SetRenderTargetRect(RenderTarget->GetViewRect());

			FCanvasLineItem lineItem(FVector2D(0, 0), FVector2D(RenderTarget->GetSizeXY().X, RenderTarget->GetSizeXY().Y));
			lineItem.LineThickness = 2;
			lineItem.SetColor(FColor::Red);
			Canvas.DrawItem(lineItem);
		}
		Canvas.Flush_RenderThread(RHICmdList, true);
	}
	RenderTarget->ClearRenderTargetTexture();
	RHICmdList.SetScissorRect(false, 0, 0, 0, 0);
}

It does work (I must have messed compilation at some point…).
See ‘simpler version’ and caveat:
MakeCustom bug