Flutter Engine
The Flutter Engine
Protected Member Functions | Protected Attributes | List of all members
skresources::ResourceProviderProxyBase Class Reference

#include <SkResources.h>

Inheritance diagram for skresources::ResourceProviderProxyBase:
skresources::ResourceProvider SkRefCnt SkRefCntBase skresources::CachingResourceProvider skresources::DataURIResourceProviderProxy

Protected Member Functions

 ResourceProviderProxyBase (sk_sp< ResourceProvider >)
 
sk_sp< SkDataload (const char[], const char[]) const override
 
sk_sp< ImageAssetloadImageAsset (const char[], const char[], const char[]) const override
 
sk_sp< SkTypefaceloadTypeface (const char[], const char[]) const override
 
sk_sp< SkDataloadFont (const char[], const char[]) const override
 
sk_sp< ExternalTrackAssetloadAudioAsset (const char[], const char[], const char[]) override
 

Protected Attributes

const sk_sp< ResourceProviderfProxy
 

Additional Inherited Members

virtual sk_sp< SkDataload (const char[], const char[]) const
 
virtual sk_sp< ImageAssetloadImageAsset (const char[], const char[], const char[]) const
 
virtual sk_sp< ExternalTrackAssetloadAudioAsset (const char[], const char[], const char[])
 
virtual sk_sp< SkDataloadFont (const char[], const char[]) const
 
virtual sk_sp< SkTypefaceloadTypeface (const char[], const char[]) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Definition at line 231 of file SkResources.h.

Constructor & Destructor Documentation

◆ ResourceProviderProxyBase()

skresources::ResourceProviderProxyBase::ResourceProviderProxyBase ( sk_sp< ResourceProvider rp)
explicitprotected

Definition at line 219 of file SkResources.cpp.

220 : fProxy(std::move(rp)) {}
const sk_sp< ResourceProvider > fProxy
Definition: SkResources.h:242

Member Function Documentation

◆ load()

sk_sp< SkData > skresources::ResourceProviderProxyBase::load ( const char  [],
const char  [] 
) const
overrideprotectedvirtual

Load a generic resource (currently only nested animations) specified by |path| + |name|, and return as an SkData.

Reimplemented from skresources::ResourceProvider.

Definition at line 222 of file SkResources.cpp.

223 {
224 return fProxy ? fProxy->load(resource_path, resource_name)
225 : nullptr;
226}
static const char * resource_name(SkPDFResourceType type)

◆ loadAudioAsset()

sk_sp< ExternalTrackAsset > skresources::ResourceProviderProxyBase::loadAudioAsset ( const char  [],
const char  [],
const char  [] 
)
overrideprotectedvirtual

Load an external audio track specified by |path|/|name|/|id|.

Reimplemented from skresources::ResourceProvider.

Definition at line 246 of file SkResources.cpp.

248 {
249 return fProxy ? fProxy->loadAudioAsset(path, name, id)
250 : nullptr;
251}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

◆ loadFont()

sk_sp< SkData > skresources::ResourceProviderProxyBase::loadFont ( const char  [],
const char  [] 
) const
overrideprotectedvirtual

DEPRECATED: implement loadTypeface() instead.

Load an external font and return as SkData.

Parameters
namefont name ("fName" Lottie property)
urlweb font URL ("fPath" Lottie property)

– Note –

This mechanism assumes monolithic fonts (single data blob). Some web font providers may serve multiple font blobs, segmented for various unicode ranges, depending on user agent capabilities (woff, woff2). In that case, the embedder would need to advertise no user agent capabilities when fetching the URL, in order to receive full font data.

Reimplemented from skresources::ResourceProvider.

Definition at line 241 of file SkResources.cpp.

241 {
242 return fProxy ? fProxy->loadFont(name, url)
243 : nullptr;
244}

◆ loadImageAsset()

sk_sp< ImageAsset > skresources::ResourceProviderProxyBase::loadImageAsset ( const char  [],
const char  [],
const char  [] 
) const
overrideprotectedvirtual

Load an image asset specified by |path| + |name|, and returns the corresponding ImageAsset proxy.

Reimplemented from skresources::ResourceProvider.

Definition at line 228 of file SkResources.cpp.

230 {
231 return fProxy ? fProxy->loadImageAsset(rpath, rname, rid)
232 : nullptr;
233}

◆ loadTypeface()

sk_sp< SkTypeface > skresources::ResourceProviderProxyBase::loadTypeface ( const char  [],
const char  [] 
) const
overrideprotectedvirtual

Load an external font and return as SkTypeface.

Parameters
namefont name
urlweb font URL

Reimplemented from skresources::ResourceProvider.

Definition at line 235 of file SkResources.cpp.

236 {
237 return fProxy ? fProxy->loadTypeface(name, url)
238 : nullptr;
239}

Member Data Documentation

◆ fProxy

const sk_sp<ResourceProvider> skresources::ResourceProviderProxyBase::fProxy
protected

Definition at line 242 of file SkResources.h.


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