chromium/cc/test/fake_layer_tree_host.h

// Copyright 2013 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_FAKE_LAYER_TREE_HOST_H_
#define CC_TEST_FAKE_LAYER_TREE_HOST_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "cc/benchmarks/micro_benchmark_controller.h"
#include "cc/test/fake_impl_task_runner_provider.h"
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/tree_synchronizer.h"

namespace cc {

class MutatorHost;
class TestTaskGraphRunner;

// FakeImplTaskRunnerProvider uses DebugScopedSetImplThread to set its task
// runner to look like the impl thread. This means it needs to outlive the
// LayerTreeHost so that the task runner remains impl-thread bound. This helper
// class is inherited before LayerTreeHost to ensure it's constructed first and
// destructed last.
class TaskRunnerProviderHolder {};

class FakeLayerTreeHost : private TaskRunnerProviderHolder,
                          public LayerTreeHost {};

}  // namespace cc

#endif  // CC_TEST_FAKE_LAYER_TREE_HOST_H_