Flutter Engine
The Flutter Engine
|
#include <GrAttachment.h>
Public Types | |
enum class | UsageFlags : uint8_t { kStencilAttachment = 0x1 , kColorAttachment = 0x2 , kTexture = 0x4 } |
Public Types inherited from GrSurface | |
typedef void * | ReleaseCtx |
typedef void(* | ReleaseProc) (ReleaseCtx) |
Public Types inherited from GrIORef< GrGpuResource > | |
enum | LastRemovedRef |
Static Public Member Functions | |
static void | ComputeSharedAttachmentUniqueKey (const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, GrMemoryless memoryless, skgpu::UniqueKey *key) |
static void | ComputeScratchKey (const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected, GrMemoryless, skgpu::ScratchKey *key) |
Static Public Member Functions inherited from GrSurface | |
static size_t | ComputeSize (const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false) |
Static Public Member Functions inherited from GrGpuResource | |
static uint32_t | CreateUniqueID () |
Private Member Functions | |
size_t | onGpuMemorySize () const final |
void | onSetLabel () override |
void | computeScratchKey (skgpu::ScratchKey *) const final |
const char * | getResourceType () const override |
This is a generic attachment class for out GrSurfaces. It always represents a single gpu allocation. It contains usage flags so that we know what the attachment can be used for.
TODO: Once we can pull out GrRenderTarget to be more of a framebuffer and break apart our texture render target diamond, we will merge this class with GrSurface. Until then this will act as the staging class for the new surface and framebuffer world.
Definition at line 25 of file GrAttachment.h.
|
strong |
Enumerator | |
---|---|
kStencilAttachment | |
kColorAttachment | |
kTexture |
Definition at line 27 of file GrAttachment.h.
|
inlineoverride |
Definition at line 34 of file GrAttachment.h.
|
inlineprotected |
Definition at line 73 of file GrAttachment.h.
|
static |
Definition at line 81 of file GrAttachment.cpp.
|
finalprivatevirtual |
Called by the registerWithCache if the resource is available to be used as scratch. Resource subclasses should override this if the instances should be recycled as scratch resources and populate the scratchKey with the key. By default resources are not recycled as scratch.
Reimplemented from GrGpuResource.
Definition at line 97 of file GrAttachment.cpp.
|
static |
Definition at line 65 of file GrAttachment.cpp.
|
inlineoverrideprivatevirtual |
Describes the type of gpu resource that is represented by the implementing class (e.g. texture, buffer object, stencil). This data is used for diagnostic purposes by dumpMemoryStatistics().
The value returned is expected to be long lived and will not be copied by the caller.
Implements GrGpuResource.
Definition at line 94 of file GrAttachment.h.
GrAttachment::GR_DECL_BITFIELD_CLASS_OPS_FRIENDS | ( | UsageFlags | ) |
|
inline |
Definition at line 42 of file GrAttachment.h.
|
inline |
Definition at line 43 of file GrAttachment.h.
|
inline |
Definition at line 40 of file GrAttachment.h.
|
inline |
Definition at line 38 of file GrAttachment.h.
|
finalprivatevirtual |
Implements GrGpuResource.
Definition at line 17 of file GrAttachment.cpp.
|
inlineoverrideprivatevirtual |
Implements GrGpuResource.
Reimplemented in GrD3DAttachment, GrGLAttachment, and GrMtlAttachment.
Definition at line 90 of file GrAttachment.h.
|
inline |
Definition at line 36 of file GrAttachment.h.