Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Friends | List of all members
skgpu::graphite::SharedContext Class Referenceabstract

#include <SharedContext.h>

Inheritance diagram for skgpu::graphite::SharedContext:
SkRefCnt SkRefCntBase skgpu::graphite::DawnSharedContext skgpu::graphite::MtlSharedContext skgpu::graphite::VulkanSharedContext

Public Member Functions

 ~SharedContext () override
 
const Capscaps () const
 
BackendApi backend () const
 
Protected isProtected () const
 
GlobalCacheglobalCache ()
 
const GlobalCacheglobalCache () const
 
const RendererProviderrendererProvider () const
 
ShaderCodeDictionaryshaderCodeDictionary ()
 
const ShaderCodeDictionaryshaderCodeDictionary () const
 
virtual std::unique_ptr< ResourceProvidermakeResourceProvider (SingleOwner *, uint32_t recorderID, size_t resourceBudget)=0
 
virtual bool isDeviceLost () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Protected Member Functions

 SharedContext (std::unique_ptr< const Caps >, BackendApi)
 

Friends

class Context
 

Detailed Description

Definition at line 32 of file SharedContext.h.

Constructor & Destructor Documentation

◆ ~SharedContext()

skgpu::graphite::SharedContext::~SharedContext ( )
override

Definition at line 26 of file SharedContext.cpp.

26 {
27 // TODO: add disconnect?
28
29 // TODO: destroyResources instead?
30}

◆ SharedContext()

skgpu::graphite::SharedContext::SharedContext ( std::unique_ptr< const Caps caps,
BackendApi  backend 
)
protected

Definition at line 20 of file SharedContext.cpp.

21 : fCaps(std::move(caps))
22 , fBackend(backend)
23 , fGlobalCache()
24 , fShaderDictionary() {}
const Caps * caps() const
Definition: SharedContext.h:39
BackendApi backend() const
Definition: SharedContext.h:41

Member Function Documentation

◆ backend()

BackendApi skgpu::graphite::SharedContext::backend ( ) const
inline

Definition at line 41 of file SharedContext.h.

41{ return fBackend; }

◆ caps()

const Caps * skgpu::graphite::SharedContext::caps ( ) const
inline

Gets the capabilities of the draw target.

Definition at line 39 of file SharedContext.h.

39{ return fCaps.get(); }

◆ globalCache() [1/2]

GlobalCache * skgpu::graphite::SharedContext::globalCache ( )
inline

Definition at line 44 of file SharedContext.h.

44{ return &fGlobalCache; }

◆ globalCache() [2/2]

const GlobalCache * skgpu::graphite::SharedContext::globalCache ( ) const
inline

Definition at line 45 of file SharedContext.h.

45{ return &fGlobalCache; }

◆ isDeviceLost()

virtual bool skgpu::graphite::SharedContext::isDeviceLost ( ) const
inlinevirtual

Reimplemented in skgpu::graphite::VulkanSharedContext.

Definition at line 58 of file SharedContext.h.

58{ return false; }

◆ isProtected()

Protected skgpu::graphite::SharedContext::isProtected ( ) const

Definition at line 32 of file SharedContext.cpp.

32{ return Protected(fCaps->protectedSupport()); }
Protected
Definition: GpuTypes.h:61

◆ makeResourceProvider()

virtual std::unique_ptr< ResourceProvider > skgpu::graphite::SharedContext::makeResourceProvider ( SingleOwner ,
uint32_t  recorderID,
size_t  resourceBudget 
)
pure virtual

◆ rendererProvider()

const RendererProvider * skgpu::graphite::SharedContext::rendererProvider ( ) const
inline

Definition at line 47 of file SharedContext.h.

47{ return fRendererProvider.get(); }

◆ shaderCodeDictionary() [1/2]

ShaderCodeDictionary * skgpu::graphite::SharedContext::shaderCodeDictionary ( )
inline

Definition at line 49 of file SharedContext.h.

49{ return &fShaderDictionary; }

◆ shaderCodeDictionary() [2/2]

const ShaderCodeDictionary * skgpu::graphite::SharedContext::shaderCodeDictionary ( ) const
inline

Definition at line 50 of file SharedContext.h.

50{ return &fShaderDictionary; }

Friends And Related Function Documentation

◆ Context

friend class Context
friend

Definition at line 64 of file SharedContext.h.


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