An immutable, thread-safe token naming one texture of a producer device, for registration on another runtime device over the same backend device. More...
#include "donner/gpu/TextureExport.h"
Public Member Functions | |
| TextureExport ()=default | |
| Constructs an empty token. | |
| bool | isValid () const |
| Whether the token names a texture. | |
| const TextureDescriptor & | descriptor () const |
| The producer's record of the texture. Requires isValid. | |
| uint64_t | producerDeviceId () const |
| Identity of the device that exported the texture, or zero for an empty token. | |
Friends | |
| class | Device |
An immutable, thread-safe token naming one texture of a producer device, for registration on another runtime device over the same backend device.
Produced by Device::exportTexture on the producer's thread and consumed by Device::registerTexture on the consumer's. Copies share one holder of the allocation: the texture's memory stays alive while any copy, or any registration made from one, is alive, even after the producer has released its handle. An empty token names nothing.