#include <stdint.h>
#include <sstream>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/time/time.h"
#include "base/timer/lap_timer.h"
#include "build/build_config.h"
#include "cc/layers/nine_patch_layer.h"
#include "cc/layers/solid_color_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/test/fake_content_layer_client.h"
#include "cc/test/layer_tree_json_parser.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/test_layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"
#include "components/viz/test/paths.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "testing/perf/perf_result_reporter.h"
namespace cc {
namespace {
static const int kTimeLimitMillis = …;
static const int kWarmupRuns = …;
static const int kTimeCheckInterval = …;
class LayerTreeHostPerfTest : public LayerTreeTest { … };
class LayerTreeHostPerfTestJsonReader : public LayerTreeHostPerfTest { … };
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_TenTenSingleThread …
#else
#define MAYBE_TenTenSingleThread …
#endif
TEST_F(LayerTreeHostPerfTestJsonReader, MAYBE_TenTenSingleThread) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_TenTenThreaded …
#else
#define MAYBE_TenTenThreaded …
#endif
TEST_F(LayerTreeHostPerfTestJsonReader, MAYBE_TenTenThreaded) { … }
TEST_F(LayerTreeHostPerfTestJsonReader,
TenTenSingleThread_FullDamageEachFrame) { … }
TEST_F(LayerTreeHostPerfTestJsonReader, TenTenThreaded_FullDamageEachFrame) { … }
class LayerTreeHostPerfTestLeafInvalidates
: public LayerTreeHostPerfTestJsonReader { … };
TEST_F(LayerTreeHostPerfTestLeafInvalidates, TenTenSingleThread) { … }
TEST_F(LayerTreeHostPerfTestLeafInvalidates, MAYBE_TenTenThreaded) { … }
class ScrollingLayerTreePerfTest : public LayerTreeHostPerfTestJsonReader { … };
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_LongScrollablePageSingleThread …
#else
#define MAYBE_LongScrollablePageSingleThread …
#endif
TEST_F(ScrollingLayerTreePerfTest, MAYBE_LongScrollablePageSingleThread) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_LongScrollablePageThreaded …
#else
#define MAYBE_LongScrollablePageThreaded …
#endif
TEST_F(ScrollingLayerTreePerfTest, MAYBE_LongScrollablePageThreaded) { … }
class BrowserCompositorInvalidateLayerTreePerfTest
: public LayerTreeHostPerfTestJsonReader { … };
TEST_F(BrowserCompositorInvalidateLayerTreePerfTest, DenseBrowserUIThreaded) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_HeavyPageThreaded …
#else
#define MAYBE_HeavyPageThreaded …
#endif
TEST_F(LayerTreeHostPerfTestJsonReader, MAYBE_HeavyPageThreaded) { … }
}
}