#include "include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkTextureCompressionType.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrTypes.h"
#include "include/gpu/ganesh/gl/GrGLTypes.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"
#include "src/gpu/ganesh/GrBackendSurfacePriv.h"
#include "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
#include "src/gpu/ganesh/gl/GrGLTypesPriv.h"
#include "src/gpu/ganesh/gl/GrGLUtil.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <string>
class GrGLBackendFormatData final : public GrBackendFormatData { … };
static GrTextureType gl_target_to_gr_target(GrGLenum target) { … }
static const GrGLBackendFormatData* get_and_cast_data(const GrBackendFormat& format) { … }
namespace GrBackendFormats {
GrBackendFormat MakeGL(GrGLenum format, GrGLenum target) { … }
GrGLFormat AsGLFormat(const GrBackendFormat& format) { … }
GrGLenum AsGLFormatEnum(const GrBackendFormat& format) { … }
}
GrGLBackendTextureData::GrGLBackendTextureData(const GrGLTextureInfo& info,
sk_sp<GrGLTextureParameters> params)
: … { … }
void GrGLBackendTextureData::copyTo(AnyTextureData& textureData) const { … }
bool GrGLBackendTextureData::isProtected() const { … }
bool GrGLBackendTextureData::equal(const GrBackendTextureData* that) const { … }
bool GrGLBackendTextureData::isSameTexture(const GrBackendTextureData* that) const { … }
GrBackendFormat GrGLBackendTextureData::getBackendFormat() const { … }
static const GrGLBackendTextureData* get_and_cast_data(const GrBackendTexture& texture) { … }
static GrGLBackendTextureData* get_and_cast_data(GrBackendTexture* texture) { … }
namespace GrBackendTextures {
GrBackendTexture MakeGL(int width,
int height,
skgpu::Mipmapped mipped,
const GrGLTextureInfo& glInfo,
std::string_view label) { … }
GrBackendTexture MakeGL(int width,
int height,
skgpu::Mipmapped mipped,
const GrGLTextureInfo& glInfo,
sk_sp<GrGLTextureParameters> params,
std::string_view label) { … }
bool GetGLTextureInfo(const GrBackendTexture& tex, GrGLTextureInfo* outInfo) { … }
void GLTextureParametersModified(GrBackendTexture* tex) { … }
}
class GrGLBackendRenderTargetData final : public GrBackendRenderTargetData { … };
static const GrGLBackendRenderTargetData* get_and_cast_data(const GrBackendRenderTarget& rt) { … }
namespace GrBackendRenderTargets {
GrBackendRenderTarget MakeGL(
int width, int height, int sampleCnt, int stencilBits, const GrGLFramebufferInfo& glInfo) { … }
bool GetGLFramebufferInfo(const GrBackendRenderTarget& rt, GrGLFramebufferInfo* outInfo) { … }
}