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"
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. | |
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.
|
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.