[go: nahoru, domu]

Add slim::LayerTreeImpl

Features added in this CL:
* Requesting and releasing FrameSink.
* Most tree properties such as visibility, viewport, scale,
  background color,
* Tracking various begin frame requests calling client BeginFrame.
* Defer begin frame.
* Various LayerTreeClient callbacks though most of these are not
  exercised yet.

Bug: 1408128
Change-Id: I1ff46431dc06608151c18c3f6f79688b3b8c61ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219268
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103513}
diff --git a/cc/slim/test_layer_tree_client.cc b/cc/slim/test_layer_tree_client.cc
new file mode 100644
index 0000000..600ec1e
--- /dev/null
+++ b/cc/slim/test_layer_tree_client.cc
@@ -0,0 +1,25 @@
+// 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.
+
+#include "cc/slim/test_layer_tree_client.h"
+
+namespace cc::slim {
+
+void TestLayerTreeClient::RequestNewFrameSink() {
+  request_new_frame_sink_count_++;
+}
+
+void TestLayerTreeClient::DidInitializeLayerTreeFrameSink() {
+  did_initialize_layer_tree_frame_sink_count_++;
+}
+
+void TestLayerTreeClient::DidFailToInitializeLayerTreeFrameSink() {
+  did_fail_to_initialize_layer_tree_frame_sink_count_++;
+}
+
+void TestLayerTreeClient::DidLoseLayerTreeFrameSink() {
+  did_lose_layer_tree_frame_sink_count_++;
+}
+
+}  // namespace cc::slim