Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Namespaces | Functions
GrGLBackendSurface.cpp File Reference
#include "include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkTextureCompressionType.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/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>

Go to the source code of this file.

Classes

class  GrGLBackendFormatData
 
class  GrGLBackendRenderTargetData
 

Namespaces

namespace  GrBackendFormats
 
namespace  GrBackendTextures
 
namespace  GrBackendRenderTargets
 

Functions

static GrTextureType gl_target_to_gr_target (GrGLenum target)
 
static const GrGLBackendFormatDataget_and_cast_data (const GrBackendFormat &format)
 
SK_API GrBackendFormat GrBackendFormats::MakeGL (GrGLenum format, GrGLenum target)
 
SK_API GrGLFormat GrBackendFormats::AsGLFormat (const GrBackendFormat &)
 
SK_API GrGLenum GrBackendFormats::AsGLFormatEnum (const GrBackendFormat &)
 
static const GrGLBackendTextureDataget_and_cast_data (const GrBackendTexture &texture)
 
static GrGLBackendTextureDataget_and_cast_data (GrBackendTexture *texture)
 
SK_API GrBackendTexture GrBackendTextures::MakeGL (int width, int height, skgpu::Mipmapped, const GrGLTextureInfo &glInfo, std::string_view label={})
 
GrBackendTexture GrBackendTextures::MakeGL (int width, int height, skgpu::Mipmapped mipped, const GrGLTextureInfo &glInfo, sk_sp< GrGLTextureParameters > params, std::string_view label)
 
SK_API bool GrBackendTextures::GetGLTextureInfo (const GrBackendTexture &, GrGLTextureInfo *)
 
SK_API void GrBackendTextures::GLTextureParametersModified (GrBackendTexture *)
 
static const GrGLBackendRenderTargetDataget_and_cast_data (const GrBackendRenderTarget &rt)
 
SK_API GrBackendRenderTarget GrBackendRenderTargets::MakeGL (int width, int height, int sampleCnt, int stencilBits, const GrGLFramebufferInfo &glInfo)
 
SK_API bool GrBackendRenderTargets::GetGLFramebufferInfo (const GrBackendRenderTarget &, GrGLFramebufferInfo *)
 

Function Documentation

◆ get_and_cast_data() [1/4]

static const GrGLBackendFormatData * get_and_cast_data ( const GrBackendFormat format)
static

Definition at line 107 of file GrGLBackendSurface.cpp.

107 {
109 SkASSERT(!data || data->type() == GrBackendApi::kOpenGL);
110 return static_cast<const GrGLBackendFormatData*>(data);
111}
#define SkASSERT(cond)
Definition: SkAssert.h:116
static const GrBackendFormatData * GetBackendData(const GrBackendFormat &format)
uint32_t uint32_t * format
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ get_and_cast_data() [2/4]

static const GrGLBackendRenderTargetData * get_and_cast_data ( const GrBackendRenderTarget rt)
static

Definition at line 265 of file GrGLBackendSurface.cpp.

◆ get_and_cast_data() [3/4]

static const GrGLBackendTextureData * get_and_cast_data ( const GrBackendTexture texture)
static

Definition at line 168 of file GrGLBackendSurface.cpp.

168 {
170 SkASSERT(!data || data->type() == GrBackendApi::kOpenGL);
171 return static_cast<const GrGLBackendTextureData*>(data);
172}
FlTexture * texture

◆ get_and_cast_data() [4/4]

static GrGLBackendTextureData * get_and_cast_data ( GrBackendTexture texture)
static

Definition at line 174 of file GrGLBackendSurface.cpp.

174 {
176 SkASSERT(!data || data->type() == GrBackendApi::kOpenGL);
177 return static_cast<GrGLBackendTextureData*>(data);
178}

◆ gl_target_to_gr_target()

static GrTextureType gl_target_to_gr_target ( GrGLenum  target)
static

Definition at line 92 of file GrGLBackendSurface.cpp.

92 {
93 switch (target) {
97 return GrTextureType::k2D;
102 default:
104 }
105}
#define GR_GL_TEXTURE_2D
Definition: GrGLDefines.h:152
#define GR_GL_TEXTURE_NONE
Definition: GrGLDefines.h:151
#define GR_GL_TEXTURE_RECTANGLE
Definition: GrGLDefines.h:1056
#define GR_GL_TEXTURE_EXTERNAL
Definition: GrGLDefines.h:1052
#define SkUNREACHABLE
Definition: SkAssert.h:135
uint32_t * target