chromium/cc/paint/skottie_resource_metadata.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_PAINT_SKOTTIE_RESOURCE_METADATA_H_
#define CC_PAINT_SKOTTIE_RESOURCE_METADATA_H_

#include <optional>
#include <string>
#include <string_view>

#include "base/containers/flat_map.h"
#include "base/files/file_path.h"
#include "base/types/id_type.h"
#include "cc/paint/paint_export.h"
#include "ui/gfx/geometry/size.h"

namespace cc {

// Each external asset in a Skottie animation has a unique "resource_id" in
// string format. This is a map from resource_id to its corresponding location.
// Note that embedded images, where the image data is encoded directly in the
// lottie file, are not included here.
class CC_PAINT_EXPORT SkottieResourceMetadataMap {};

// For performance reasons, the resource_id can be hashed, and the caller can
// circulate the resulting integer throughout the system.
SkottieResourceIdHash;
SkottieResourceIdHash CC_PAINT_EXPORT
HashSkottieResourceId(std::string_view resource_id);

}  // namespace cc

#endif  // CC_PAINT_SKOTTIE_RESOURCE_METADATA_H_