Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::ExportedTextureBacking Class Reference

Backend half of an exported texture: a reference to the native allocation, plus whatever a sibling device of the same backend needs to name it. More...

#include "donner/gpu/TextureExport.h"

Inheritance diagram for donner::gpu::ExportedTextureBacking:
[legend]

Public Member Functions

 ExportedTextureBacking (const ExportedTextureBacking &)=delete
ExportedTextureBacking & operator= (const ExportedTextureBacking &)=delete
virtual void releaseBackingNow () const
 Releases the allocation at once, for a producer that asked to give its backing back while another device still read it.

Detailed Description

Backend half of an exported texture: a reference to the native allocation, plus whatever a sibling device of the same backend needs to name it.

Every export token and registration made from one export shares this object, so the allocation lives exactly as long as the last of them. The last reference can be dropped on any thread and after either device is gone, so a derived class's destructor must be safe anywhere and must retain whatever releasing the native object requires.

Member Function Documentation

◆ releaseBackingNow()

virtual void donner::gpu::ExportedTextureBacking::releaseBackingNow ( ) const
virtual

Releases the allocation at once, for a producer that asked to give its backing back while another device still read it.

Called exactly once, by whichever thread drops the last holder, after the producer has released its handle and outside every runtime lock; nothing names the texture afterwards.

The default does nothing, which is right for a backend whose allocation goes away with its last reference.


The documentation for this class was generated from the following file: