20#define GPUGL static_cast<GrGLGpu*>(this->getGpu())
21#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
32 SK_ABORT(
"Unexpected texture target");
44 SK_ABORT(
"Unexpected texture target");
54 std::string_view label)
55 :
GrSurface(gpu, desc.fSize, desc.fIsProtected, label)
59 TextureTypeFromTarget(desc.fTarget),
72 GrIOType ioType, std::string_view label)
73 :
GrSurface(gpu, desc.fSize, desc.fIsProtected, label)
77 TextureTypeFromTarget(desc.fTarget),
80 , fParameters(
std::move(parameters)) {
93 std::string_view label)
94 :
GrSurface(gpu, desc.fSize, desc.fIsProtected, label)
98 TextureTypeFromTarget(desc.fTarget),
110 fFormat = desc.fFormat;
111 fTextureIDOwnership = desc.fOwnership;
122 GL_CALL(DeleteTextures(1, &fID));
156 std::string_view label) {
178 const std::string label =
"_Skia_" + this->
getLabel();
190 bool refsWrappedTextureObjects =
203 resourceName.
append(
"/texture");
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define GR_GL_TEXTURE_RECTANGLE
#define GR_GL_TEXTURE_EXTERNAL
static GrGLenum target_from_texture_type(GrTextureType type)
bool GrGLFormatIsCompressed(GrGLFormat format)
#define GR_GL_CALL(IFACE, X)
static constexpr GrGLenum GrGLFormatToEnum(GrGLFormat format)
#define SK_ABORT(message,...)
static void releaseProc(const void *ptr, void *context)
sk_sp< T > sk_make_sp(Args &&... args)
#define ATRACE_ANDROID_FRAMEWORK_ALWAYS(fmt,...)
bool debugSupport() const
Is there support for GL_KHR_debug?
const GrGLCaps & glCaps() const
const GrGLInterface * glInterface() const
GrBackendFormat backendFormat() const override
GrGLuint textureID() const
GrGLTextureParameters * parameters()
void onRelease() override
void onSetLabel() override
void dumpMemoryStatistics(SkTraceMemoryDump *traceMemoryDump) const override
GrBackendTexture getBackendTexture() const override
static GrTextureType TextureTypeFromTarget(GrGLenum textureTarget)
void onAbandon() override
GrGLTexture(GrGLGpu *, skgpu::Budgeted, const Desc &, GrMipmapStatus, std::string_view label)
static sk_sp< GrGLTexture > MakeWrapped(GrGLGpu *, GrMipmapStatus, const Desc &, sk_sp< GrGLTextureParameters >, GrWrapCacheable, GrIOType, std::string_view label)
bool onStealBackendTexture(GrBackendTexture *, SkImages::BackendTextureReleaseProc *) override
std::string getLabel() const
void dumpMemoryStatisticsPriv(SkTraceMemoryDump *traceMemoryDump, const SkString &resourceName, const char *type, size_t size) const
UniqueID uniqueID() const
SkString getResourceName() const
void registerWithCacheWrapped(GrWrapCacheable)
void registerWithCache(skgpu::Budgeted)
SkISize dimensions() const
static size_t ComputeSize(const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
skgpu::Mipmapped mipmapped() const
GrMipmapStatus mipmapStatus() const
GrTextureType textureType() const
void append(const char text[])
void appendU32(uint32_t value)
const char * c_str() const
virtual void setMemoryBacking(const char *dumpName, const char *backingType, const char *backingObjectId)=0
virtual bool shouldDumpWrappedObjects() const
EMSCRIPTEN_KEEPALIVE void empty()
SK_API GrBackendTexture MakeGL(int width, int height, skgpu::Mipmapped, const GrGLTextureInfo &glInfo, std::string_view label={})
std::function< void(GrBackendTexture)> BackendTextureReleaseProc
#define TRACE_EVENT0(category_group, name)