![]() |
1.11 |
#include <surface.h>
Public Types | |
| using | ReleaseFunction = std::function< void(void *)> |
Public Member Functions | |
| Surface (const detail::FrameBuffer &fb) | |
| Surface (const Size &size={}, PixelFormat format=PixelFormat::argb8888) | |
| Surface (const Surface &)=delete | |
| Surface (Surface &&rhs) | |
| Surface (void *data, const ReleaseFunction &release, const Size &size, PixelFormat format, DefaultDim stride) | |
| ~Surface () | |
| EGT_NODISCARD Color | color_at (const Point &point) const |
| void | color_at (const Point &point, const Color &color) |
| void * | data () |
| const void * | data () const |
| bool | empty () const |
| void | flood (const Point &point, const Color &color) |
| void | flush (bool claimed_by_cpu=false) const |
| PixelFormat | format () const |
| DefaultDim | height () const |
| EGT_NODISCARD const detail::InternalSurface & | impl () const |
| void | mark_dirty () |
| operator bool () const noexcept | |
| Surface & | operator= (const Surface &)=delete |
| Surface & | operator= (Surface &&rhs) |
| const Size & | size () const |
| DefaultDim | stride () const |
| void | sync_for_cpu () const |
| Claim the surface for being used by the CPU. | |
| DefaultDim | width () const |
| void | write_to_png (const std::string &name) const |
| void | zero () |
Static Public Member Functions | |
| static DefaultDim | stride (PixelFormat format, DefaultDim width) |
Protected Attributes | |
| void * | m_data {nullptr} |
| PixelFormat | m_format {PixelFormat::invalid} |
| std::unique_ptr< detail::InternalSurface > | m_impl |
| ReleaseFunction | m_release |
| Size | m_size |
| DefaultDim | m_stride {0} |
| using ReleaseFunction = std::function<void(void*)> |
| Surface | ( | const Size & | size = {}, |
| PixelFormat | format = PixelFormat::argb8888 |
||
| ) |
| Surface | ( | void * | data, |
| const ReleaseFunction & | release, | ||
| const Size & | size, | ||
| PixelFormat | format, | ||
| DefaultDim | stride | ||
| ) |
| Surface | ( | const detail::FrameBuffer & | fb | ) |
| ~Surface | ( | ) |
|
inline |
|
inline |
|
inline |
| void flush | ( | bool | claimed_by_cpu = false | ) | const |
|
inline |
|
inline |
|
inline |
| void mark_dirty | ( | ) |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
|
static |
| void sync_for_cpu | ( | ) | const |
Claim the surface for being used by the CPU.
Wait for all GPU operations, if any, to complete.
|
inline |
| void write_to_png | ( | const std::string & | name | ) | const |
| void zero | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |