#include <GrGLBuffer.h>
|
| GrGLBuffer (GrGLGpu *, size_t size, GrGpuBufferType intendedType, GrAccessPattern, std::string_view label) |
|
void | onAbandon () override |
|
void | onRelease () override |
|
void | setMemoryBacking (SkTraceMemoryDump *traceMemoryDump, const SkString &dumpName) const override |
|
| GrGpuBuffer (GrGpu *, size_t sizeInBytes, GrGpuBufferType, GrAccessPattern, std::string_view label) |
|
void | registerWithCache (skgpu::Budgeted) |
|
void | registerWithCacheWrapped (GrWrapCacheable) |
|
| GrGpuResource (GrGpu *, std::string_view label) |
|
virtual | ~GrGpuResource () |
|
GrGpu * | getGpu () const |
|
virtual void | onRelease () |
|
virtual void | onAbandon () |
|
virtual void | setMemoryBacking (SkTraceMemoryDump *, const SkString &) const |
|
SkString | getResourceName () const |
|
void | dumpMemoryStatisticsPriv (SkTraceMemoryDump *traceMemoryDump, const SkString &resourceName, const char *type, size_t size) const |
|
| GrIORef () |
|
bool | internalHasRef () const |
|
bool | internalHasNoCommandBufferUsages () const |
|
void | addInitialRef () const |
|
| GrBuffer ()=default |
|
Definition at line 17 of file GrGLBuffer.h.
◆ ~GrGLBuffer()
GrGLBuffer::~GrGLBuffer |
( |
| ) |
|
|
inlineoverride |
◆ GrGLBuffer()
Definition at line 103 of file GrGLBuffer.cpp.
110 , fBufferID(0)
112 , fHasAttachedToTexture(false) {
113 GL_CALL(GenBuffers(1, &fBufferID));
114 if (fBufferID) {
118 nullptr,
119 fUsage));
121 GL_CALL(DeleteBuffers(1, &fBufferID));
122 fBufferID = 0;
123 }
124 }
126 if (!fBufferID) {
128 }
129}
#define GL_ALLOC_CALL(gpu, call)
static GrGLenum gr_to_gl_access_pattern(GrGpuBufferType bufferType, GrAccessPattern accessPattern, const GrGLCaps &caps)
signed long int GrGLsizeiptr
const GrGLCaps & glCaps() const
GrGLenum bindBuffer(GrGpuBufferType type, const GrBuffer *)
size_t size() const final
GrGpuBufferType intendedType() const
GrAccessPattern accessPattern() const
void removeScratchKey() const
void registerWithCache(skgpu::Budgeted)
ResourcePriv resourcePriv()
const uint8_t uint32_t uint32_t GError ** error
◆ bufferID()
◆ hasAttachedToTexture()
bool GrGLBuffer::hasAttachedToTexture |
( |
| ) |
const |
|
inline |
Definition at line 32 of file GrGLBuffer.h.
32{ return fHasAttachedToTexture; }
◆ Make()
Definition at line 31 of file GrGLBuffer.cpp.
34 {
38 return nullptr;
39 }
40
42 "MakeGlBuffer"));
43 if (0 ==
buffer->bufferID()) {
44 return nullptr;
45 }
47}
GrGLBuffer(GrGLGpu *, size_t size, GrGpuBufferType intendedType, GrAccessPattern, std::string_view label)
TransferBufferType transferBufferType() const
What type of transfer buffer is supported?
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ onAbandon()
void GrGLBuffer::onAbandon |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to abandon any internal handles, ptrs, etc to backend API resources. This may be called when the underlying 3D context is no longer valid and so no backend API calls should be made.
Reimplemented from GrGpuResource.
Definition at line 155 of file GrGLBuffer.cpp.
155 {
156 fBufferID = 0;
159}
◆ onRelease()
void GrGLBuffer::onRelease |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to free GPU resources in the backend API.
Reimplemented from GrGpuResource.
Definition at line 140 of file GrGLBuffer.cpp.
140 {
142
144
145 if (fBufferID) {
146 GL_CALL(DeleteBuffers(1, &fBufferID));
147 fBufferID = 0;
148 }
150 }
151
153}
bool wasDestroyed() const
#define TRACE_EVENT0(category_group, name)
◆ setHasAttachedToTexture()
void GrGLBuffer::setHasAttachedToTexture |
( |
| ) |
|
|
inline |
Definition at line 31 of file GrGLBuffer.h.
31{ fHasAttachedToTexture = true; }
◆ setMemoryBacking()
Allows subclasses to add additional backing information to the SkTraceMemoryDump.
Reimplemented from GrGpuResource.
Definition at line 288 of file GrGLBuffer.cpp.
289 {
292 traceMemoryDump->setMemoryBacking(dumpName.c_str(),
"gl_buffer", buffer_id.
c_str());
293}
GrGLuint bufferID() const
void appendU32(uint32_t value)
const char * c_str() const
The documentation for this class was generated from the following files: