1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cc / slim / test_layer_tree_client.h [blame]
// Copyright 2023 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_SLIM_TEST_LAYER_TREE_CLIENT_H_
#define CC_SLIM_TEST_LAYER_TREE_CLIENT_H_
#include "cc/slim/layer_tree_client.h"
namespace cc::slim {
class TestLayerTreeClient : public LayerTreeClient {
public:
TestLayerTreeClient() = default;
~TestLayerTreeClient() override = default;
void BeginFrame(const viz::BeginFrameArgs& args) override {}
void DidSubmitCompositorFrame() override {}
void DidReceiveCompositorFrameAck() override {}
void RequestNewFrameSink() override;
void DidInitializeLayerTreeFrameSink() override;
void DidFailToInitializeLayerTreeFrameSink() override;
void DidLoseLayerTreeFrameSink() override;
uint32_t request_new_frame_sink_count() const {
return request_new_frame_sink_count_;
}
uint32_t did_initialize_layer_tree_frame_sink_count() const {
return did_initialize_layer_tree_frame_sink_count_;
}
uint32_t did_fail_to_initialize_layer_tree_frame_sink_count() const {
return did_fail_to_initialize_layer_tree_frame_sink_count_;
}
uint32_t did_lose_layer_tree_frame_sink_count() const {
return did_lose_layer_tree_frame_sink_count_;
}
private:
uint32_t request_new_frame_sink_count_ = 0u;
uint32_t did_initialize_layer_tree_frame_sink_count_ = 0u;
uint32_t did_fail_to_initialize_layer_tree_frame_sink_count_ = 0u;
uint32_t did_lose_layer_tree_frame_sink_count_ = 0u;
};
} // namespace cc::slim
#endif // CC_SLIM_TEST_LAYER_TREE_CLIENT_H_