Flutter Engine
The Flutter Engine
|
#include <GrDynamicAtlas.h>
Classes | |
class | Node |
Public Types | |
enum class | InternalMultisample : bool { kNo = false , kYes = true } |
enum class | RectanizerAlgorithm { kSkyline , kPow2 } |
using | LazyAtlasDesc = GrSurfaceProxy::LazySurfaceDesc |
using | LazyInstantiateAtlasCallback = GrSurfaceProxy::LazyInstantiateCallback |
Public Member Functions | |
GrDynamicAtlas (GrColorType colorType, InternalMultisample, SkISize initialSize, int maxAtlasSize, const GrCaps &, RectanizerAlgorithm=RectanizerAlgorithm::kSkyline) | |
virtual | ~GrDynamicAtlas () |
void | reset (SkISize initialSize, const GrCaps &desc) |
GrColorType | colorType () const |
int | maxAtlasSize () const |
GrTextureProxy * | textureProxy () const |
GrSurfaceProxyView | readView (const GrCaps &) const |
GrSurfaceProxyView | writeView (const GrCaps &) const |
bool | isInstantiated () const |
bool | addRect (int width, int height, SkIPoint16 *location) |
const SkISize & | drawBounds () |
bool | instantiate (GrOnFlushResourceProvider *, sk_sp< GrTexture > backingTexture=nullptr) |
Static Public Member Functions | |
static sk_sp< GrTextureProxy > | MakeLazyAtlasProxy (LazyInstantiateAtlasCallback &&, GrColorType colorType, InternalMultisample, const GrCaps &, GrSurfaceProxy::UseAllocator) |
Static Public Attributes | |
static constexpr GrSurfaceOrigin | kTextureOrigin = kTopLeft_GrSurfaceOrigin |
static constexpr int | kPadding = 1 |
This class implements a dynamic size skgpu::Rectanizer that grows until it reaches the implementation-dependent max texture size. When finalized, it also creates and stores a GrTextureProxy for the underlying atlas.
Definition at line 25 of file GrDynamicAtlas.h.
Definition at line 32 of file GrDynamicAtlas.h.
Definition at line 33 of file GrDynamicAtlas.h.
|
strong |
Enumerator | |
---|---|
kNo | |
kYes |
Definition at line 35 of file GrDynamicAtlas.h.
|
strong |
Enumerator | |
---|---|
kSkyline | |
kPow2 |
Definition at line 46 of file GrDynamicAtlas.h.
GrDynamicAtlas::GrDynamicAtlas | ( | GrColorType | colorType, |
InternalMultisample | internalMultisample, | ||
SkISize | initialSize, | ||
int | maxAtlasSize, | ||
const GrCaps & | caps, | ||
RectanizerAlgorithm | algorithm = RectanizerAlgorithm::kSkyline |
||
) |
Definition at line 77 of file GrDynamicAtlas.cpp.
|
virtual |
Definition at line 88 of file GrDynamicAtlas.cpp.
bool GrDynamicAtlas::addRect | ( | int | width, |
int | height, | ||
SkIPoint16 * | location | ||
) |
Definition at line 136 of file GrDynamicAtlas.cpp.
|
inline |
Definition at line 58 of file GrDynamicAtlas.h.
|
inline |
Definition at line 68 of file GrDynamicAtlas.h.
bool GrDynamicAtlas::instantiate | ( | GrOnFlushResourceProvider * | onFlushRP, |
sk_sp< GrTexture > | backingTexture = nullptr |
||
) |
Definition at line 193 of file GrDynamicAtlas.cpp.
|
inline |
Definition at line 63 of file GrDynamicAtlas.h.
|
static |
Definition at line 57 of file GrDynamicAtlas.cpp.
|
inline |
Definition at line 59 of file GrDynamicAtlas.h.
GrSurfaceProxyView GrDynamicAtlas::readView | ( | const GrCaps & | caps | ) | const |
Definition at line 126 of file GrDynamicAtlas.cpp.
Definition at line 91 of file GrDynamicAtlas.cpp.
|
inline |
Definition at line 60 of file GrDynamicAtlas.h.
GrSurfaceProxyView GrDynamicAtlas::writeView | ( | const GrCaps & | caps | ) | const |
Definition at line 131 of file GrDynamicAtlas.cpp.
|
inlinestaticconstexpr |
Definition at line 29 of file GrDynamicAtlas.h.
|
inlinestaticconstexpr |
Definition at line 28 of file GrDynamicAtlas.h.