FastUIDraw
|
Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable packed data. More...
#include <painter_data_value.hpp>
Public Member Functions | |
PainterDataValue (const T *p=nullptr) | |
PainterDataValue (const PainterPackedValue< T > &p) | |
c_array< const reference_counted_ptr< const Image > > | bind_images (void) const |
void | make_packed (PainterPackedValuePool &pool) |
bool | packed (void) const |
Public Attributes | |
PainterPackedValue< T > | m_packed_value |
const T * | m_value |
Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable packed data.
Holds both a PainterPackedValue and a pointer to a value. If m_packed_value is valid, then its value is used. If it is nullptr then the value pointed to by m_value is used.
Definition at line 43 of file painter_data_value.hpp.
|
inline |
Ctor from a value.
p | value with which to initialize, the object pointed to by p must stay in scope until either make_packed() is called or the dtor of this PainterDataValue object is called. |
Definition at line 53 of file painter_data_value.hpp.
|
inline |
Ctor from a packed value.
p | value with which to initialize m_packed_value |
Definition at line 61 of file painter_data_value.hpp.
|
inline |
Only makes sense for PainterBrushShaderData, see PainterBrushShaderData::bind_images().
Definition at line 71 of file painter_data_value.hpp.
void fastuidraw::PainterDataValue< T >::make_packed | ( | PainterPackedValuePool & | pool | ) |
If m_packed_value is null, then sets it to a packed value created by the passed PainterPackedValuePool. In addition, sets m_value to nullptr.
pool | PainterPackedValuePool from which to create the packed value |
Definition at line 111 of file painter_packed_value_pool.hpp.
|
inline |
Provided as a conveniance, equivalent to
Definition at line 96 of file painter_data_value.hpp.
PainterPackedValue<T> fastuidraw::PainterDataValue< T >::m_packed_value |
Value pre-packed and ready for reuse.
Definition at line 109 of file painter_data_value.hpp.
const T* fastuidraw::PainterDataValue< T >::m_value |
Pointer to value.
Definition at line 104 of file painter_data_value.hpp.