chromium/cc/test/lottie_test_data.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_TEST_LOTTIE_TEST_DATA_H_
#define CC_TEST_LOTTIE_TEST_DATA_H_

#include <string>
#include <string_view>

#include "base/files/file_path.h"
#include "base/time/time.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect_f.h"

namespace cc {

// A skottie animation with solid green color for the first 2.5 seconds and then
// a solid blue color for the next 2.5 seconds.
constexpr std::string_view kLottieDataWithoutAssets1 =;

constexpr std::string_view kLottieDataWithoutAssets1Color1Node =;
constexpr std::string_view kLottieDataWithoutAssets1Color2Node =;
constexpr SkColor kLottieDataWithoutAssets1Color1 =;
constexpr SkColor kLottieDataWithoutAssets1Color2 =;

// Returns an animation with the same structure as |kLottieDataWithoutAssets1|
// except with color node names specified by the caller.
std::string CreateCustomLottieDataWith2ColorNodes(
    std::string_view color_node_1,
    std::string_view color_node_2);

// A skottie animation with solid green color for the first second and then
// a solid blue color for the next second.
constexpr std::string_view kLottieDataWithoutAssets2 =;

// A test animation generated in Adobe AE that displays image_0 for a second,
// then image_1 for another second.
constexpr int kLottieDataWith2AssetsWidth =;
constexpr int kLottieDataWith2AssetsHeight =;
constexpr base::TimeDelta kLottieDataWith2AssetsDuration =;
constexpr std::string_view kLottieDataWith2Assets =;

// Returns an animation with the same structure as |kLottieDataWith2Assets|
// except with asset ids specified by the caller.
std::string CreateCustomLottieDataWith2Assets(
    std::string_view custom_asset_id_0,
    std::string_view custom_asset_id_1);

// cc/test/data/lottie/animation_with_2_text_nodes.json
constexpr base::FilePath::CharType kLottieDataWith2TextFileName[] =);
constexpr std::string_view kLottieDataWith2TextNode1 =;
constexpr std::string_view kLottieDataWith2TextNode1Text =;
constexpr std::string_view kLottieDataWith2TextNode2 =;
constexpr std::string_view kLottieDataWith2TextNode2Text =;
constexpr gfx::RectF kLottieDataWith2TextNode1Box =;
constexpr gfx::RectF kLottieDataWith2TextNode2Box =;
constexpr gfx::PointF kLottieDataWith2TextNode1Position =;
constexpr gfx::PointF kLottieDataWith2TextNode2Position =;

// Returns an animation with the same structure as
// |kLottieDataWith2TextFileName| except with text node names specified by the
// caller.
std::string CreateCustomLottieDataWith2TextNodes(
    std::string_view custom_text_node_name_0,
    std::string_view custom_text_node_name_1);

constexpr std::string_view kLottieDataWith2MarkersMarker1 =;
constexpr std::string_view kLottieDataWith2MarkersMarker2 =;
constexpr float kLottieDataWith2MarkersMarker1Time =;
constexpr float kLottieDataWith2MarkersMarker2Time =;
// Duration: 6 seconds. Marker 1 is at 2 seconds, and marker 2 is at 4 seconds.
constexpr std::string_view kLottieDataWith2Markers =;

}  // namespace cc

#endif  // CC_TEST_LOTTIE_TEST_DATA_H_