ResourceProviderProxyBase should forward loadAudioAsset()

ResourceProviderProxyBase is supposed to forward all virtuals to fProxy,
but it currently drops loadAudioAsset().

TBR=
Change-Id: I8c690802cd3ba6078232e210b032aa67499d7ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368116
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2021-02-08 18:05:18 -05:00 committed by Skia Commit-Bot
parent a43d58393a
commit 21b8cec137
2 changed files with 8 additions and 0 deletions

View File

@ -209,6 +209,7 @@ protected:
sk_sp<ImageAsset> loadImageAsset(const char[], const char[], const char[]) const override;
sk_sp<SkTypeface> loadTypeface(const char[], const char[]) const override;
sk_sp<SkData> loadFont(const char[], const char[]) const override;
sk_sp<ExternalTrackAsset> loadAudioAsset(const char[], const char[], const char[]) override;
private:
const sk_sp<ResourceProvider> fProxy;

View File

@ -235,6 +235,13 @@ sk_sp<SkData> ResourceProviderProxyBase::loadFont(const char name[], const char
: nullptr;
}
sk_sp<ExternalTrackAsset> ResourceProviderProxyBase::loadAudioAsset(const char path[],
const char name[],
const char id[]) {
return fProxy ? fProxy->loadAudioAsset(path, name, id)
: nullptr;
}
CachingResourceProvider::CachingResourceProvider(sk_sp<ResourceProvider> rp)
: INHERITED(std::move(rp)) {}