diff --git a/osu.Framework/Graphics/BufferedDrawNode.cs b/osu.Framework/Graphics/BufferedDrawNode.cs
index 7e9da554db..f250b96411 100644
--- a/osu.Framework/Graphics/BufferedDrawNode.cs
+++ b/osu.Framework/Graphics/BufferedDrawNode.cs
@@ -143,7 +143,7 @@ protected virtual void DrawContents(IRenderer renderer)
///
/// The to bind.
/// A token that must be disposed upon finishing use of .
- protected IDisposable BindFrameBuffer(IFrameBuffer frameBuffer)
+ protected ValueInvokeOnDisposal BindFrameBuffer(IFrameBuffer frameBuffer)
{
// This setter will also take care of allocating a texture of appropriate size within the frame buffer.
frameBuffer.Size = frameBufferSize;
@@ -153,7 +153,7 @@ protected IDisposable BindFrameBuffer(IFrameBuffer frameBuffer)
return new ValueInvokeOnDisposal(frameBuffer, static b => b.Unbind());
}
- private IDisposable establishFrameBufferViewport(IRenderer renderer)
+ private ValueInvokeOnDisposal<(BufferedDrawNode node, IRenderer renderer)> establishFrameBufferViewport(IRenderer renderer)
{
// Disable masking for generating the frame buffer since masking will be re-applied
// when actually drawing later on anyways. This allows more information to be captured