#include "cc/paint/skottie_mru_resource_provider.h"
#include <optional>
#include <utility>
#include "base/check.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/values.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkRefCnt.h"
namespace cc {
namespace {
constexpr std::string_view kAssetsKey = …;
constexpr std::string_view kIdKey = …;
constexpr std::string_view kWidthKey = …;
constexpr std::string_view kHeightKey = …;
base::flat_map< std::string, gfx::Size> ParseImageAssetDimensions(
std::string_view animation_json) { … }
class ImageAssetImpl : public skresources::ImageAsset { … };
}
SkottieMRUResourceProvider::SkottieMRUResourceProvider(
FrameDataCallback frame_data_cb,
std::string_view animation_json)
: … { … }
SkottieMRUResourceProvider::~SkottieMRUResourceProvider() = default;
const SkottieResourceMetadataMap&
SkottieMRUResourceProvider::GetImageAssetMetadata() const { … }
sk_sp<skresources::ImageAsset> SkottieMRUResourceProvider::loadImageAsset(
const char resource_path[],
const char resource_name[],
const char resource_id[]) const { … }
}