Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GrGLContextInfo Class Reference

#include <GrGLContext.h>

Inheritance diagram for GrGLContextInfo:
GrGLContext

Classes

struct  ConstructorArgs
 

Public Member Functions

 GrGLContextInfo (GrGLContextInfo &&)=default
 
GrGLContextInfooperator= (GrGLContextInfo &&)=default
 
virtual ~GrGLContextInfo ()
 
GrGLStandard standard () const
 
GrGLVersion version () const
 
SkSL::GLSLGeneration glslGeneration () const
 
GrGLVendor vendor () const
 
GrGLRenderer renderer () const
 
GrGLANGLEBackend angleBackend () const
 
GrGLDriver angleDriver () const
 
GrGLVendor angleVendor () const
 
GrGLRenderer angleRenderer () const
 
GrGLVendor webglVendor () const
 
GrGLRenderer webglRenderer () const
 
GrGLDriver driver () const
 
GrGLDriverVersion driverVersion () const
 
bool isOverCommandBuffer () const
 
bool isRunningOverVirgl () const
 
const GrGLCapscaps () const
 
GrGLCapscaps ()
 
bool hasExtension (const char *ext) const
 
const GrGLExtensionsextensions () const
 

Protected Member Functions

GrGLContextInfooperator= (const GrGLContextInfo &)=default
 
 GrGLContextInfo (const GrGLContextInfo &)=default
 
 GrGLContextInfo (ConstructorArgs &&)
 

Protected Attributes

sk_sp< const GrGLInterfacefInterface
 
GrGLDriverInfo fDriverInfo
 
SkSL::GLSLGeneration fGLSLGeneration
 
sk_sp< GrGLCapsfGLCaps
 

Detailed Description

Encapsulates information about an OpenGL context including the OpenGL version, the GrGLStandard type of the context, and GLSL version.

Definition at line 23 of file GrGLContext.h.

Constructor & Destructor Documentation

◆ GrGLContextInfo() [1/3]

GrGLContextInfo::GrGLContextInfo ( GrGLContextInfo &&  )
default

◆ ~GrGLContextInfo()

virtual GrGLContextInfo::~GrGLContextInfo ( )
inlinevirtual

Definition at line 28 of file GrGLContext.h.

28{}

◆ GrGLContextInfo() [2/3]

GrGLContextInfo::GrGLContextInfo ( const GrGLContextInfo )
protecteddefault

◆ GrGLContextInfo() [3/3]

GrGLContextInfo::GrGLContextInfo ( ConstructorArgs &&  args)
protected

Definition at line 78 of file GrGLContext.cpp.

78 {
79 fInterface = std::move(args.fInterface);
80 fDriverInfo = args.fDriverInfo;
81 fGLSLGeneration = args.fGLSLGeneration;
82
83 fGLCaps = sk_make_sp<GrGLCaps>(*args.fContextOptions, *this, fInterface.get());
84}
GrGLDriverInfo fDriverInfo
Definition GrGLContext.h:92
sk_sp< const GrGLInterface > fInterface
Definition GrGLContext.h:91
SkSL::GLSLGeneration fGLSLGeneration
Definition GrGLContext.h:93
sk_sp< GrGLCaps > fGLCaps
Definition GrGLContext.h:94
T * get() const
Definition SkRefCnt.h:303
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

Member Function Documentation

◆ angleBackend()

GrGLANGLEBackend GrGLContextInfo::angleBackend ( ) const
inline

Definition at line 54 of file GrGLContext.h.

54{ return fDriverInfo.fANGLEBackend; }
GrGLANGLEBackend fANGLEBackend
Definition GrGLUtil.h:310

◆ angleDriver()

GrGLDriver GrGLContextInfo::angleDriver ( ) const
inline

Definition at line 55 of file GrGLContext.h.

55{ return fDriverInfo.fANGLEDriver; }
GrGLDriver fANGLEDriver
Definition GrGLUtil.h:313

◆ angleRenderer()

GrGLRenderer GrGLContextInfo::angleRenderer ( ) const
inline

Definition at line 57 of file GrGLContext.h.

GrGLRenderer fANGLERenderer
Definition GrGLUtil.h:312

◆ angleVendor()

GrGLVendor GrGLContextInfo::angleVendor ( ) const
inline

Definition at line 56 of file GrGLContext.h.

56{ return fDriverInfo.fANGLEVendor; }
GrGLVendor fANGLEVendor
Definition GrGLUtil.h:311

◆ caps() [1/2]

GrGLCaps * GrGLContextInfo::caps ( )
inline

Definition at line 70 of file GrGLContext.h.

70{ return fGLCaps.get(); }

◆ caps() [2/2]

const GrGLCaps * GrGLContextInfo::caps ( ) const
inline

Definition at line 69 of file GrGLContext.h.

69{ return fGLCaps.get(); }

◆ driver()

GrGLDriver GrGLContextInfo::driver ( ) const
inline

What driver is running our GL implementation? This is not necessarily related to the vendor. (e.g. Intel GPU being driven by Mesa)

Definition at line 64 of file GrGLContext.h.

64{ return fDriverInfo.fDriver; }
GrGLDriver fDriver
Definition GrGLUtil.h:307

◆ driverVersion()

GrGLDriverVersion GrGLContextInfo::driverVersion ( ) const
inline

Definition at line 65 of file GrGLContext.h.

GrGLDriverVersion fDriverVersion
Definition GrGLUtil.h:308

◆ extensions()

const GrGLExtensions & GrGLContextInfo::extensions ( ) const
inline

Definition at line 76 of file GrGLContext.h.

76{ return fInterface->fExtensions; }
GrGLExtensions fExtensions

◆ glslGeneration()

SkSL::GLSLGeneration GrGLContextInfo::glslGeneration ( ) const
inline

Definition at line 32 of file GrGLContext.h.

32{ return fGLSLGeneration; }

◆ hasExtension()

bool GrGLContextInfo::hasExtension ( const char *  ext) const
inline

Definition at line 72 of file GrGLContext.h.

72 {
73 return fInterface->hasExtension(ext);
74 }
bool hasExtension(const char ext[]) const

◆ isOverCommandBuffer()

bool GrGLContextInfo::isOverCommandBuffer ( ) const
inline

Definition at line 66 of file GrGLContext.h.

bool fIsOverCommandBuffer
Definition GrGLUtil.h:320

◆ isRunningOverVirgl()

bool GrGLContextInfo::isRunningOverVirgl ( ) const
inline

Definition at line 67 of file GrGLContext.h.

bool fIsRunningOverVirgl
Definition GrGLUtil.h:323

◆ operator=() [1/2]

GrGLContextInfo & GrGLContextInfo::operator= ( const GrGLContextInfo )
protecteddefault

◆ operator=() [2/2]

GrGLContextInfo & GrGLContextInfo::operator= ( GrGLContextInfo &&  )
default

◆ renderer()

GrGLRenderer GrGLContextInfo::renderer ( ) const
inline

Definition at line 47 of file GrGLContext.h.

47 {
49 return this->angleRenderer();
50 } else {
52 }
53 }
GrGLANGLEBackend angleBackend() const
Definition GrGLContext.h:54
GrGLRenderer angleRenderer() const
Definition GrGLContext.h:57
GrGLRenderer fRenderer
Definition GrGLUtil.h:306

◆ standard()

GrGLStandard GrGLContextInfo::standard ( ) const
inline

Definition at line 30 of file GrGLContext.h.

30{ return fInterface->fStandard; }
GrGLStandard fStandard

◆ vendor()

GrGLVendor GrGLContextInfo::vendor ( ) const
inline

We've accumlated a lot of GL driver workarounds and performance preferences based on vendor and renderer. When we have GL sitting on top of Angle it is not clear which of these are necessary and which are handle by Angle. Thus to be safe we get the underlying GL vendor and renderer from Angle so we can enable these workarounds. It may mean that the same workaround is implemented both in Skia and Angle, but that is better than missing out on one.

Definition at line 40 of file GrGLContext.h.

40 {
42 return this->angleVendor();
43 } else {
44 return fDriverInfo.fVendor;
45 }
46 }
GrGLVendor angleVendor() const
Definition GrGLContext.h:56
GrGLVendor fVendor
Definition GrGLUtil.h:305

◆ version()

GrGLVersion GrGLContextInfo::version ( ) const
inline

Definition at line 31 of file GrGLContext.h.

31{ return fDriverInfo.fVersion; }
GrGLVersion fVersion
Definition GrGLUtil.h:303

◆ webglRenderer()

GrGLRenderer GrGLContextInfo::webglRenderer ( ) const
inline

Definition at line 60 of file GrGLContext.h.

GrGLRenderer fWebGLRenderer
Definition GrGLUtil.h:317

◆ webglVendor()

GrGLVendor GrGLContextInfo::webglVendor ( ) const
inline

Definition at line 59 of file GrGLContext.h.

59{ return fDriverInfo.fWebGLVendor; }
GrGLVendor fWebGLVendor
Definition GrGLUtil.h:316

Member Data Documentation

◆ fDriverInfo

GrGLDriverInfo GrGLContextInfo::fDriverInfo
protected

Definition at line 92 of file GrGLContext.h.

◆ fGLCaps

sk_sp<GrGLCaps> GrGLContextInfo::fGLCaps
protected

Definition at line 94 of file GrGLContext.h.

◆ fGLSLGeneration

SkSL::GLSLGeneration GrGLContextInfo::fGLSLGeneration
protected

Definition at line 93 of file GrGLContext.h.

◆ fInterface

sk_sp<const GrGLInterface> GrGLContextInfo::fInterface
protected

Definition at line 91 of file GrGLContext.h.


The documentation for this class was generated from the following files: