[go: nahoru, domu]

Move cc/output things that are part of layer compositor API to cc/trees

These are things used in the cc/trees classes, so put them there.

R=enne@chromium.org
TBR=jam

Bug: 722935
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifb215909e1ce4c6e1687240634085088d02c541b
Reviewed-on: https://chromium-review.googlesource.com/676227
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503469}
diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc
index f89de782..195b9fe4b 100644
--- a/android_webview/browser/aw_render_thread_context_provider.cc
+++ b/android_webview/browser/aw_render_thread_context_provider.cc
@@ -9,7 +9,6 @@
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/trace_event/trace_event.h"
-#include "cc/output/managed_memory_policy.h"
 #include "components/viz/common/gpu/context_cache_controller.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
diff --git a/ash/fast_ink/fast_ink_view.cc b/ash/fast_ink/fast_ink_view.cc
index 2e5fdaac..f742950 100644
--- a/ash/fast_ink/fast_ink_view.cc
+++ b/ash/fast_ink/fast_ink_view.cc
@@ -13,7 +13,7 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "cc/base/math_util.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/gpu/context_provider.h"
 #include "components/viz/common/quads/texture_draw_quad.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/ash/fast_ink/fast_ink_view.h b/ash/fast_ink/fast_ink_view.h
index e23ba6ad..b2b28216 100644
--- a/ash/fast_ink/fast_ink_view.h
+++ b/ash/fast_ink/fast_ink_view.h
@@ -11,7 +11,7 @@
 #include "base/containers/flat_map.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/resources/resource_id.h"
 #include "ui/views/view.h"
 
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index b1414ef..81a8c57 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -138,20 +138,12 @@
     "output/compositor_frame.h",
     "output/compositor_frame_metadata.cc",
     "output/compositor_frame_metadata.h",
-    "output/latency_info_swap_promise.cc",
-    "output/latency_info_swap_promise.h",
-    "output/layer_tree_frame_sink.cc",
-    "output/layer_tree_frame_sink.h",
-    "output/layer_tree_frame_sink_client.h",
-    "output/managed_memory_policy.cc",
-    "output/managed_memory_policy.h",
     "output/output_surface_frame.cc",
     "output/output_surface_frame.h",
     "output/overlay_candidate.cc",
     "output/overlay_candidate.h",
     "output/software_output_device.cc",
     "output/software_output_device.h",
-    "output/swap_promise.h",
     "raster/bitmap_raster_buffer_provider.cc",
     "raster/bitmap_raster_buffer_provider.h",
     "raster/gpu_raster_buffer_provider.cc",
@@ -294,8 +286,13 @@
     "trees/element_id.h",
     "trees/frame_rate_counter.cc",
     "trees/frame_rate_counter.h",
+    "trees/latency_info_swap_promise.cc",
+    "trees/latency_info_swap_promise.h",
     "trees/latency_info_swap_promise_monitor.cc",
     "trees/latency_info_swap_promise_monitor.h",
+    "trees/layer_tree_frame_sink.cc",
+    "trees/layer_tree_frame_sink.h",
+    "trees/layer_tree_frame_sink_client.h",
     "trees/layer_tree_host.cc",
     "trees/layer_tree_host.h",
     "trees/layer_tree_host_client.h",
@@ -309,6 +306,8 @@
     "trees/layer_tree_mutator.h",
     "trees/layer_tree_settings.cc",
     "trees/layer_tree_settings.h",
+    "trees/managed_memory_policy.cc",
+    "trees/managed_memory_policy.h",
     "trees/mutable_properties.h",
     "trees/mutator_host.h",
     "trees/mutator_host_client.h",
@@ -334,6 +333,7 @@
     "trees/scroll_node.h",
     "trees/single_thread_proxy.cc",
     "trees/single_thread_proxy.h",
+    "trees/swap_promise.h",
     "trees/swap_promise_manager.cc",
     "trees/swap_promise_manager.h",
     "trees/swap_promise_monitor.cc",
@@ -615,7 +615,6 @@
     "layers/video_layer_impl_unittest.cc",
     "layers/viewport_unittest.cc",
     "output/context_cache_controller_unittest.cc",
-    "output/layer_tree_frame_sink_unittest.cc",
     "output/renderer_pixeltest.cc",
     "paint/discardable_image_map_unittest.cc",
     "paint/display_item_list_unittest.cc",
@@ -652,6 +651,7 @@
     "tiles/tile_priority_unittest.cc",
     "trees/blocking_task_runner_unittest.cc",
     "trees/damage_tracker_unittest.cc",
+    "trees/layer_tree_frame_sink_unittest.cc",
     "trees/layer_tree_host_common_unittest.cc",
     "trees/layer_tree_host_impl_unittest.cc",
     "trees/layer_tree_host_pixeltest_blending.cc",
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index 9f1533e..e128bc7 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -11,8 +11,8 @@
 #include "base/single_thread_task_runner.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/layers/surface_layer_impl.h"
-#include "cc/output/swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_manager.h"
 #include "cc/trees/task_runner_provider.h"
 #include "components/viz/common/surfaces/surface_sequence_generator.h"
diff --git a/cc/layers/texture_layer_impl_unittest.cc b/cc/layers/texture_layer_impl_unittest.cc
index 90d612af..7fcc1f9 100644
--- a/cc/layers/texture_layer_impl_unittest.cc
+++ b/cc/layers/texture_layer_impl_unittest.cc
@@ -6,9 +6,9 @@
 
 #include <stddef.h>
 
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/test/fake_layer_tree_frame_sink.h"
 #include "cc/test/layer_test_common.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/gpu/context_provider.h"
 #include "components/viz/common/quads/draw_quad.h"
 #include "components/viz/common/quads/texture_draw_quad.h"
diff --git a/cc/test/fake_layer_tree_frame_sink.cc b/cc/test/fake_layer_tree_frame_sink.cc
index dfc59ba..ff03537 100644
--- a/cc/test/fake_layer_tree_frame_sink.cc
+++ b/cc/test/fake_layer_tree_frame_sink.cc
@@ -6,7 +6,7 @@
 
 #include "base/bind.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/frame_sinks/delay_based_time_source.h"
 #include "components/viz/common/resources/returned_resource.h"
diff --git a/cc/test/fake_layer_tree_frame_sink.h b/cc/test/fake_layer_tree_frame_sink.h
index 70a57d9..872c8b8 100644
--- a/cc/test/fake_layer_tree_frame_sink.h
+++ b/cc/test/fake_layer_tree_frame_sink.h
@@ -13,12 +13,12 @@
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/output/software_output_device.h"
 #include "cc/test/test_context_provider.h"
 #include "cc/test/test_gles2_interface.h"
 #include "cc/test/test_shared_bitmap_manager.h"
 #include "cc/test/test_web_graphics_context_3d.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 #include "components/viz/test/test_gpu_memory_buffer_manager.h"
 
diff --git a/cc/test/fake_layer_tree_frame_sink_client.cc b/cc/test/fake_layer_tree_frame_sink_client.cc
index bd53a9e..f041dfb 100644
--- a/cc/test/fake_layer_tree_frame_sink_client.cc
+++ b/cc/test/fake_layer_tree_frame_sink_client.cc
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include "cc/test/fake_layer_tree_frame_sink_client.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 
 namespace cc {
 
diff --git a/cc/test/fake_layer_tree_frame_sink_client.h b/cc/test/fake_layer_tree_frame_sink_client.h
index 960150d..428d101 100644
--- a/cc/test/fake_layer_tree_frame_sink_client.h
+++ b/cc/test/fake_layer_tree_frame_sink_client.h
@@ -5,9 +5,9 @@
 #ifndef CC_TEST_FAKE_LAYER_TREE_FRAME_SINK_CLIENT_H_
 #define CC_TEST_FAKE_LAYER_TREE_FRAME_SINK_CLIENT_H_
 
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 
-#include "cc/output/managed_memory_policy.h"
+#include "cc/trees/managed_memory_policy.h"
 
 namespace cc {
 
diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc
index 930c874..750f939 100644
--- a/cc/test/layer_tree_pixel_resource_test.cc
+++ b/cc/test/layer_tree_pixel_resource_test.cc
@@ -6,13 +6,13 @@
 
 #include "base/memory/ptr_util.h"
 #include "cc/layers/layer.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/raster/bitmap_raster_buffer_provider.h"
 #include "cc/raster/gpu_raster_buffer_provider.h"
 #include "cc/raster/one_copy_raster_buffer_provider.h"
 #include "cc/raster/raster_buffer_provider.h"
 #include "cc/raster/zero_copy_raster_buffer_provider.h"
 #include "cc/resources/resource_pool.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "gpu/GLES2/gl2extchromium.h"
 
 namespace cc {
diff --git a/cc/test/test_layer_tree_host_base.h b/cc/test/test_layer_tree_host_base.h
index 4bbd512..6634380 100644
--- a/cc/test/test_layer_tree_host_base.h
+++ b/cc/test/test_layer_tree_host_base.h
@@ -7,12 +7,12 @@
 
 #include <memory>
 
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/test/fake_impl_task_runner_provider.h"
 #include "cc/test/fake_layer_tree_host_impl.h"
 #include "cc/test/fake_picture_layer_impl.h"
 #include "cc/test/test_task_graph_runner.h"
 #include "cc/tiles/tile_priority.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/gfx/geometry/size.h"
 
diff --git a/cc/output/latency_info_swap_promise.cc b/cc/trees/latency_info_swap_promise.cc
similarity index 89%
rename from cc/output/latency_info_swap_promise.cc
rename to cc/trees/latency_info_swap_promise.cc
index 8cf78cb..bb12e7a 100644
--- a/cc/output/latency_info_swap_promise.cc
+++ b/cc/trees/latency_info_swap_promise.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/output/latency_info_swap_promise.h"
+#include "cc/trees/latency_info_swap_promise.h"
 
 #include <stdint.h>
 
@@ -29,11 +29,9 @@
 namespace cc {
 
 LatencyInfoSwapPromise::LatencyInfoSwapPromise(const ui::LatencyInfo& latency)
-    : latency_(latency) {
-}
+    : latency_(latency) {}
 
-LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {
-}
+LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {}
 
 void LatencyInfoSwapPromise::WillSwap(CompositorFrameMetadata* metadata) {
   DCHECK(!latency_.terminated());
@@ -58,8 +56,7 @@
 
 // Trace the original LatencyInfo of a LatencyInfoSwapPromise
 void LatencyInfoSwapPromise::OnCommit() {
-  TRACE_EVENT_WITH_FLOW1("input,benchmark",
-                         "LatencyInfo.Flow",
+  TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow",
                          TRACE_ID_DONT_MANGLE(TraceId()),
                          TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
                          "step", "HandleInputEventMainCommit");
diff --git a/cc/output/latency_info_swap_promise.h b/cc/trees/latency_info_swap_promise.h
similarity index 80%
rename from cc/output/latency_info_swap_promise.h
rename to cc/trees/latency_info_swap_promise.h
index 91abe7d..095c29f 100644
--- a/cc/output/latency_info_swap_promise.h
+++ b/cc/trees/latency_info_swap_promise.h
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
-#define CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
+#ifndef CC_TREES_LATENCY_INFO_SWAP_PROMISE_H_
+#define CC_TREES_LATENCY_INFO_SWAP_PROMISE_H_
 
 #include <stdint.h>
 
 #include "base/compiler_specific.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 #include "ui/latency/latency_info.h"
 
 namespace cc {
@@ -32,4 +32,4 @@
 
 }  // namespace cc
 
-#endif  // CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
+#endif  // CC_TREES_LATENCY_INFO_SWAP_PROMISE_H_
diff --git a/cc/trees/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
index ddd1a09..dc25793 100644
--- a/cc/trees/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -7,7 +7,7 @@
 #include <stdint.h>
 
 #include "base/threading/platform_thread.h"
-#include "cc/output/latency_info_swap_promise.h"
+#include "cc/trees/latency_info_swap_promise.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/swap_promise_manager.h"
diff --git a/cc/output/layer_tree_frame_sink.cc b/cc/trees/layer_tree_frame_sink.cc
similarity index 95%
rename from cc/output/layer_tree_frame_sink.cc
rename to cc/trees/layer_tree_frame_sink.cc
index 9a50b1d5..79547697 100644
--- a/cc/output/layer_tree_frame_sink.cc
+++ b/cc/trees/layer_tree_frame_sink.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 
 #include <stdint.h>
 
@@ -11,7 +11,7 @@
 #include "base/macros.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "gpu/GLES2/gl2extchromium.h"
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/cc/output/layer_tree_frame_sink.h b/cc/trees/layer_tree_frame_sink.h
similarity index 97%
rename from cc/output/layer_tree_frame_sink.h
rename to cc/trees/layer_tree_frame_sink.h
index 5ef471f..8c2a058 100644
--- a/cc/output/layer_tree_frame_sink.h
+++ b/cc/trees/layer_tree_frame_sink.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CC_OUTPUT_LAYER_TREE_FRAME_SINK_H_
-#define CC_OUTPUT_LAYER_TREE_FRAME_SINK_H_
+#ifndef CC_TREES_LAYER_TREE_FRAME_SINK_H_
+#define CC_TREES_LAYER_TREE_FRAME_SINK_H_
 
 #include <deque>
 #include <memory>
@@ -26,7 +26,7 @@
 class LocalSurfaceId;
 class SharedBitmapManager;
 struct BeginFrameAck;
-}
+}  // namespace viz
 
 namespace cc {
 
@@ -150,4 +150,4 @@
 
 }  // namespace cc
 
-#endif  // CC_OUTPUT_LAYER_TREE_FRAME_SINK_H_
+#endif  // CC_TREES_LAYER_TREE_FRAME_SINK_H_
diff --git a/cc/output/layer_tree_frame_sink_client.h b/cc/trees/layer_tree_frame_sink_client.h
similarity index 94%
rename from cc/output/layer_tree_frame_sink_client.h
rename to cc/trees/layer_tree_frame_sink_client.h
index ff114a7..b1587ee 100644
--- a/cc/output/layer_tree_frame_sink_client.h
+++ b/cc/trees/layer_tree_frame_sink_client.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CC_OUTPUT_LAYER_TREE_FRAME_SINK_CLIENT_H_
-#define CC_OUTPUT_LAYER_TREE_FRAME_SINK_CLIENT_H_
+#ifndef CC_TREES_LAYER_TREE_FRAME_SINK_CLIENT_H_
+#define CC_TREES_LAYER_TREE_FRAME_SINK_CLIENT_H_
 
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
@@ -77,4 +77,4 @@
 
 }  // namespace cc
 
-#endif  // CC_OUTPUT_LAYER_TREE_FRAME_SINK_CLIENT_H_
+#endif  // CC_TREES_LAYER_TREE_FRAME_SINK_CLIENT_H_
diff --git a/cc/output/layer_tree_frame_sink_unittest.cc b/cc/trees/layer_tree_frame_sink_unittest.cc
similarity index 98%
rename from cc/output/layer_tree_frame_sink_unittest.cc
rename to cc/trees/layer_tree_frame_sink_unittest.cc
index 9eb669c..1cb7668 100644
--- a/cc/output/layer_tree_frame_sink_unittest.cc
+++ b/cc/trees/layer_tree_frame_sink_unittest.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 
 #include "base/memory/ptr_util.h"
 #include "cc/output/compositor_frame.h"
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 0cb638f..96d2ff8 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -33,13 +33,13 @@
 #include "cc/input/scrollbar.h"
 #include "cc/layers/layer_collections.h"
 #include "cc/layers/layer_list_iterator.h"
-#include "cc/output/layer_tree_frame_sink.h"
-#include "cc/output/swap_promise.h"
 #include "cc/trees/compositor_mode.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host_client.h"
 #include "cc/trees/layer_tree_settings.h"
 #include "cc/trees/mutator_host.h"
 #include "cc/trees/proxy.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_manager.h"
 #include "cc/trees/target_property.h"
 #include "components/viz/common/resources/resource_format.h"
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 7822ede6..e7605f17 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -47,7 +47,6 @@
 #include "cc/layers/viewport.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/compositor_frame_metadata.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/raster/bitmap_raster_buffer_provider.h"
 #include "cc/raster/gpu_raster_buffer_provider.h"
 #include "cc/raster/one_copy_raster_buffer_provider.h"
@@ -69,6 +68,7 @@
 #include "cc/trees/effect_node.h"
 #include "cc/trees/frame_rate_counter.h"
 #include "cc/trees/latency_info_swap_promise_monitor.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/mutator_host.h"
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index dbaf4a5..250d679 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -25,8 +25,6 @@
 #include "cc/input/input_handler.h"
 #include "cc/input/scrollbar_animation_controller.h"
 #include "cc/layers/layer_collections.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
-#include "cc/output/managed_memory_policy.h"
 #include "cc/resources/layer_tree_resource_provider.h"
 #include "cc/resources/ui_resource_client.h"
 #include "cc/scheduler/begin_frame_tracker.h"
@@ -36,8 +34,10 @@
 #include "cc/tiles/decoded_image_tracker.h"
 #include "cc/tiles/image_decode_cache.h"
 #include "cc/tiles/tile_manager.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "cc/trees/layer_tree_mutator.h"
 #include "cc/trees/layer_tree_settings.h"
+#include "cc/trees/managed_memory_policy.h"
 #include "cc/trees/mutator_host_client.h"
 #include "cc/trees/task_runner_provider.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 22f9114..0ca07e3 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -36,7 +36,6 @@
 #include "cc/layers/video_layer_impl.h"
 #include "cc/layers/viewport.h"
 #include "cc/output/compositor_frame_metadata.h"
-#include "cc/output/latency_info_swap_promise.h"
 #include "cc/resources/ui_resource_bitmap.h"
 #include "cc/resources/ui_resource_manager.h"
 #include "cc/test/animation_test_common.h"
@@ -55,6 +54,7 @@
 #include "cc/test/test_task_graph_runner.h"
 #include "cc/test/test_web_graphics_context_3d.h"
 #include "cc/trees/effect_node.h"
+#include "cc/trees/latency_info_swap_promise.h"
 #include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/mutator_host.h"
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 3b059fe..67ab40a 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -25,7 +25,6 @@
 #include "cc/layers/picture_layer.h"
 #include "cc/layers/solid_color_layer.h"
 #include "cc/layers/video_layer.h"
-#include "cc/output/swap_promise.h"
 #include "cc/resources/ui_resource_manager.h"
 #include "cc/test/fake_content_layer_client.h"
 #include "cc/test/fake_layer_tree_host_client.h"
@@ -53,6 +52,7 @@
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/scroll_node.h"
 #include "cc/trees/single_thread_proxy.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_manager.h"
 #include "cc/trees/transform_node.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 9462970..fa1b7be 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -29,11 +29,11 @@
 #include "cc/layers/layer_list_iterator.h"
 #include "cc/layers/render_surface_impl.h"
 #include "cc/layers/scrollbar_layer_impl_base.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/resources/ui_resource_request.h"
 #include "cc/trees/clip_node.h"
 #include "cc/trees/draw_property_utils.h"
 #include "cc/trees/effect_node.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/mutator_host.h"
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 86c53fc..a4a3fed 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -20,10 +20,10 @@
 #include "cc/input/scroll_boundary_behavior.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/layer_list_iterator.h"
-#include "cc/output/swap_promise.h"
 #include "cc/resources/ui_resource_client.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/property_tree.h"
+#include "cc/trees/swap_promise.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 
 namespace base {
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index d045f67..0b68410 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -12,9 +12,9 @@
 #include "base/time/time.h"
 #include "cc/cc_export.h"
 #include "cc/debug/layer_tree_debug_state.h"
-#include "cc/output/managed_memory_policy.h"
 #include "cc/scheduler/scheduler_settings.h"
 #include "cc/tiles/tile_manager_settings.h"
+#include "cc/trees/managed_memory_policy.h"
 #include "components/viz/common/display/renderer_settings.h"
 #include "components/viz/common/resources/resource_format.h"
 #include "components/viz/common/resources/resource_settings.h"
diff --git a/cc/output/managed_memory_policy.cc b/cc/trees/managed_memory_policy.cc
similarity index 97%
rename from cc/output/managed_memory_policy.cc
rename to cc/trees/managed_memory_policy.cc
index ed3f4a86..3583c8b 100644
--- a/cc/output/managed_memory_policy.cc
+++ b/cc/trees/managed_memory_policy.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/output/managed_memory_policy.h"
+#include "cc/trees/managed_memory_policy.h"
 
 #include <stddef.h>
 
diff --git a/cc/output/managed_memory_policy.h b/cc/trees/managed_memory_policy.h
similarity index 83%
rename from cc/output/managed_memory_policy.h
rename to cc/trees/managed_memory_policy.h
index 886bebd..ceecc05 100644
--- a/cc/output/managed_memory_policy.h
+++ b/cc/trees/managed_memory_policy.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CC_OUTPUT_MANAGED_MEMORY_POLICY_H_
-#define CC_OUTPUT_MANAGED_MEMORY_POLICY_H_
+#ifndef CC_TREES_MANAGED_MEMORY_POLICY_H_
+#define CC_TREES_MANAGED_MEMORY_POLICY_H_
 
 #include <stddef.h>
 
@@ -21,8 +21,7 @@
   static const size_t kDefaultNumResourcesLimit;
 
   explicit ManagedMemoryPolicy(size_t bytes_limit_when_visible);
-  explicit ManagedMemoryPolicy(
-      const gpu::MemoryAllocation& allocation);
+  explicit ManagedMemoryPolicy(const gpu::MemoryAllocation& allocation);
   ManagedMemoryPolicy(
       size_t bytes_limit_when_visible,
       gpu::MemoryAllocation::PriorityCutoff priority_cutoff_when_visible,
@@ -40,4 +39,4 @@
 
 }  // namespace cc
 
-#endif  // CC_OUTPUT_MANAGED_MEMORY_POLICY_H_
+#endif  // CC_TREES_MANAGED_MEMORY_POLICY_H_
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 089825b..ca3c228 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -18,8 +18,8 @@
 #include "cc/base/devtools_instrumentation.h"
 #include "cc/benchmarks/benchmark_instrumentation.h"
 #include "cc/input/browser_controls_offset_manager.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/scheduler/compositor_timing_history.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/mutator_host.h"
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index 056a856..cff9b41 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -13,14 +13,14 @@
 #include "cc/base/completion_event.h"
 #include "cc/base/devtools_instrumentation.h"
 #include "cc/benchmarks/benchmark_instrumentation.h"
-#include "cc/output/layer_tree_frame_sink.h"
-#include "cc/output/swap_promise.h"
 #include "cc/resources/ui_resource_manager.h"
 #include "cc/trees/blocking_task_runner.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host.h"
 #include "cc/trees/mutator_host.h"
 #include "cc/trees/proxy_impl.h"
 #include "cc/trees/scoped_abort_remaining_swap_promises.h"
+#include "cc/trees/swap_promise.h"
 
 namespace cc {
 
diff --git a/cc/trees/scoped_abort_remaining_swap_promises.h b/cc/trees/scoped_abort_remaining_swap_promises.h
index ec6c9e4..b6c1197 100644
--- a/cc/trees/scoped_abort_remaining_swap_promises.h
+++ b/cc/trees/scoped_abort_remaining_swap_promises.h
@@ -6,7 +6,7 @@
 #define CC_TREES_SCOPED_ABORT_REMAINING_SWAP_PROMISES_H_
 
 #include "base/macros.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_manager.h"
 
 namespace cc {
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index de68f37..bc0f6c2 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -9,11 +9,11 @@
 #include "base/trace_event/trace_event.h"
 #include "cc/base/devtools_instrumentation.h"
 #include "cc/benchmarks/benchmark_instrumentation.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/resources/ui_resource_manager.h"
 #include "cc/scheduler/commit_earlyout_reason.h"
 #include "cc/scheduler/compositor_timing_history.h"
 #include "cc/scheduler/scheduler.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_host_single_thread_client.h"
diff --git a/cc/output/swap_promise.h b/cc/trees/swap_promise.h
similarity index 96%
rename from cc/output/swap_promise.h
rename to cc/trees/swap_promise.h
index 70b9ac87..858161c 100644
--- a/cc/output/swap_promise.h
+++ b/cc/trees/swap_promise.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CC_OUTPUT_SWAP_PROMISE_H_
-#define CC_OUTPUT_SWAP_PROMISE_H_
+#ifndef CC_TREES_SWAP_PROMISE_H_
+#define CC_TREES_SWAP_PROMISE_H_
 
 #include <stdint.h>
 
@@ -76,4 +76,4 @@
 
 }  // namespace cc
 
-#endif  // CC_OUTPUT_SWAP_PROMISE_H_
+#endif  // CC_TREES_SWAP_PROMISE_H_
diff --git a/cc/trees/swap_promise_manager.cc b/cc/trees/swap_promise_manager.cc
index 7a17741..124e2b3 100644
--- a/cc/trees/swap_promise_manager.cc
+++ b/cc/trees/swap_promise_manager.cc
@@ -4,7 +4,7 @@
 
 #include "cc/trees/swap_promise_manager.h"
 
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_monitor.h"
 
 namespace cc {
diff --git a/cc/trees/swap_promise_manager.h b/cc/trees/swap_promise_manager.h
index 795493d..da72a8ac 100644
--- a/cc/trees/swap_promise_manager.h
+++ b/cc/trees/swap_promise_manager.h
@@ -10,7 +10,7 @@
 
 #include "base/macros.h"
 #include "cc/cc_export.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 
 namespace cc {
 class SwapPromise;
diff --git a/components/exo/layer_tree_frame_sink_holder.cc b/components/exo/layer_tree_frame_sink_holder.cc
index 05c10a1f..83d7ff3 100644
--- a/components/exo/layer_tree_frame_sink_holder.cc
+++ b/components/exo/layer_tree_frame_sink_holder.cc
@@ -4,7 +4,7 @@
 
 #include "components/exo/layer_tree_frame_sink_holder.h"
 
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/exo/surface_tree_host.h"
 #include "components/viz/common/resources/returned_resource.h"
 
diff --git a/components/exo/layer_tree_frame_sink_holder.h b/components/exo/layer_tree_frame_sink_holder.h
index 2d950ef..7f0147f 100644
--- a/components/exo/layer_tree_frame_sink_holder.h
+++ b/components/exo/layer_tree_frame_sink_holder.h
@@ -8,7 +8,7 @@
 #include <memory>
 
 #include "base/containers/flat_map.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/quads/release_callback.h"
 
 namespace cc {
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 9f925ad9..adc91d4 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -21,7 +21,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/exo/surface.h"
 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
 #include "ui/aura/client/aura_constants.h"
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index 8765e65..2158f3d4 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -13,7 +13,7 @@
 #include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/exo/buffer.h"
 #include "components/exo/pointer.h"
 #include "components/exo/surface_delegate.h"
diff --git a/components/exo/surface_tree_host.cc b/components/exo/surface_tree_host.cc
index d03738e5..a33dd23f 100644
--- a/components/exo/surface_tree_host.cc
+++ b/components/exo/surface_tree_host.cc
@@ -9,7 +9,7 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/exo/layer_tree_frame_sink_holder.h"
 #include "components/exo/surface.h"
 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
diff --git a/components/viz/client/client_layer_tree_frame_sink.cc b/components/viz/client/client_layer_tree_frame_sink.cc
index 524b86f..09a1894 100644
--- a/components/viz/client/client_layer_tree_frame_sink.cc
+++ b/components/viz/client/client_layer_tree_frame_sink.cc
@@ -8,7 +8,7 @@
 #include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/client/hit_test_data_provider.h"
 #include "components/viz/client/local_surface_id_provider.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
diff --git a/components/viz/client/client_layer_tree_frame_sink.h b/components/viz/client/client_layer_tree_frame_sink.h
index 22edb9e..8d3da4ae 100644
--- a/components/viz/client/client_layer_tree_frame_sink.h
+++ b/components/viz/client/client_layer_tree_frame_sink.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/gpu/context_provider.h"
 #include "components/viz/common/surfaces/local_surface_id_allocator.h"
diff --git a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc
index 7927a23..b9baa9d 100644
--- a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc
+++ b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc
@@ -6,7 +6,7 @@
 
 #include "base/bind.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "components/viz/common/surfaces/local_surface_id_allocator.h"
 #include "components/viz/service/display/display.h"
diff --git a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h
index 1702b55..52d91bf0 100644
--- a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h
+++ b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 #include "base/threading/thread_checker.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/surfaces/local_surface_id_allocator.h"
 #include "components/viz/service/display/display_client.h"
diff --git a/components/viz/test/test_layer_tree_frame_sink.cc b/components/viz/test/test_layer_tree_frame_sink.cc
index 1af442a..65ca0e5 100644
--- a/components/viz/test/test_layer_tree_frame_sink.cc
+++ b/components/viz/test/test_layer_tree_frame_sink.cc
@@ -9,7 +9,7 @@
 
 #include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 #include "components/viz/common/quads/copy_output_request.h"
 #include "components/viz/service/display/direct_renderer.h"
diff --git a/components/viz/test/test_layer_tree_frame_sink.h b/components/viz/test/test_layer_tree_frame_sink.h
index 26b20caa5..3d0b97a 100644
--- a/components/viz/test/test_layer_tree_frame_sink.h
+++ b/components/viz/test/test_layer_tree_frame_sink.h
@@ -7,7 +7,7 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/display/renderer_settings.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/surfaces/local_surface_id_allocator.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index b43c6f0..ff77fbe8 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -26,7 +26,7 @@
 #include "cc/layers/layer.h"
 #include "cc/layers/surface_layer.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/latency_info_swap_promise.h"
+#include "cc/trees/latency_info_swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
 #include "components/viz/common/gl_helper.h"
 #include "components/viz/common/quads/copy_output_request.h"
diff --git a/content/renderer/android/synchronous_layer_tree_frame_sink.cc b/content/renderer/android/synchronous_layer_tree_frame_sink.cc
index e4bff44..e14314c 100644
--- a/content/renderer/android/synchronous_layer_tree_frame_sink.cc
+++ b/content/renderer/android/synchronous_layer_tree_frame_sink.cc
@@ -14,9 +14,9 @@
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
 #include "cc/output/output_surface_frame.h"
 #include "cc/output/software_output_device.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/display/renderer_settings.h"
 #include "components/viz/common/gpu/context_provider.h"
 #include "components/viz/common/quads/render_pass.h"
diff --git a/content/renderer/android/synchronous_layer_tree_frame_sink.h b/content/renderer/android/synchronous_layer_tree_frame_sink.h
index 13e141ff..b350182 100644
--- a/content/renderer/android/synchronous_layer_tree_frame_sink.h
+++ b/content/renderer/android/synchronous_layer_tree_frame_sink.h
@@ -16,8 +16,8 @@
 #include "base/memory/ref_counted.h"
 #include "base/threading/thread_checker.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink.h"
-#include "cc/output/managed_memory_policy.h"
+#include "cc/trees/layer_tree_frame_sink.h"
+#include "cc/trees/managed_memory_policy.h"
 #include "components/viz/service/display/display_client.h"
 #include "ipc/ipc_message.h"
 #include "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom.h"
diff --git a/content/renderer/gpu/frame_swap_message_queue.h b/content/renderer/gpu/frame_swap_message_queue.h
index 1dccf1d..1a1dd74 100644
--- a/content/renderer/gpu/frame_swap_message_queue.h
+++ b/content/renderer/gpu/frame_swap_message_queue.h
@@ -14,7 +14,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 #include "content/common/content_export.h"
 #include "content/renderer/message_delivery_policy.h"
 
diff --git a/content/renderer/gpu/queue_message_swap_promise.h b/content/renderer/gpu/queue_message_swap_promise.h
index 15a3591..abd55c50 100644
--- a/content/renderer/gpu/queue_message_swap_promise.h
+++ b/content/renderer/gpu/queue_message_swap_promise.h
@@ -8,7 +8,7 @@
 #include <stdint.h>
 
 #include "base/memory/ref_counted.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 
 namespace IPC {
 class SyncMessageFilter;
diff --git a/content/renderer/gpu/queue_message_swap_promise_unittest.cc b/content/renderer/gpu/queue_message_swap_promise_unittest.cc
index a02cc38..f2c9ebc 100644
--- a/content/renderer/gpu/queue_message_swap_promise_unittest.cc
+++ b/content/renderer/gpu/queue_message_swap_promise_unittest.cc
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/test/scoped_task_environment.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/swap_promise.h"
 #include "content/common/view_messages.h"
 #include "content/renderer/gpu/frame_swap_message_queue.h"
 #include "content/renderer/gpu/render_widget_compositor.h"
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 0014e4ca..aeb94bc 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -38,11 +38,11 @@
 #include "cc/debug/layer_tree_debug_state.h"
 #include "cc/input/layer_selection_bound.h"
 #include "cc/layers/layer.h"
-#include "cc/output/latency_info_swap_promise.h"
-#include "cc/output/swap_promise.h"
+#include "cc/trees/latency_info_swap_promise.h"
 #include "cc/trees/latency_info_swap_promise_monitor.h"
 #include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_mutator.h"
+#include "cc/trees/swap_promise.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/quads/copy_output_request.h"
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index cb880b6..d532948 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -12,11 +12,11 @@
 #include "base/time/time.h"
 #include "base/values.h"
 #include "cc/input/browser_controls_state.h"
-#include "cc/output/managed_memory_policy.h"
-#include "cc/output/swap_promise.h"
 #include "cc/trees/layer_tree_host_client.h"
 #include "cc/trees/layer_tree_host_single_thread_client.h"
 #include "cc/trees/layer_tree_settings.h"
+#include "cc/trees/managed_memory_policy.h"
+#include "cc/trees/swap_promise.h"
 #include "cc/trees/swap_promise_monitor.h"
 #include "content/common/content_export.h"
 #include "content/renderer/gpu/compositor_dependencies.h"
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index fbfb49c..4c342e71 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -45,8 +45,8 @@
 #include "cc/base/histograms.h"
 #include "cc/base/switches.h"
 #include "cc/blink/web_layer_impl.h"
-#include "cc/output/layer_tree_frame_sink.h"
 #include "cc/raster/task_graph_runner.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_settings.h"
 #include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 11e37fe4..29dffe6 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -25,7 +25,7 @@
 #include "build/build_config.h"
 #include "cc/animation/animation_host.h"
 #include "cc/input/touch_action.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "cc/trees/layer_tree_host.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/quads/copy_output_request.h"
diff --git a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
index 37ea4a5c..020c6b04 100644
--- a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
+++ b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
@@ -17,7 +17,6 @@
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/memory_dump_manager.h"
-#include "cc/output/managed_memory_policy.h"
 #include "components/viz/common/gpu/context_cache_controller.h"
 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
diff --git a/third_party/WebKit/public/platform/WebLayerTreeView.h b/third_party/WebKit/public/platform/WebLayerTreeView.h
index ef41701..8cf87df 100644
--- a/third_party/WebKit/public/platform/WebLayerTreeView.h
+++ b/third_party/WebKit/public/platform/WebLayerTreeView.h
@@ -36,7 +36,6 @@
 #include "WebScrollBoundaryBehavior.h"
 #include "WebSize.h"
 #include "base/callback.h"
-#include "cc/output/swap_promise.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 
 #include "third_party/skia/include/core/SkImage.h"
diff --git a/ui/aura/DEPS b/ui/aura/DEPS
index 5edbb33a..7a319fe 100644
--- a/ui/aura/DEPS
+++ b/ui/aura/DEPS
@@ -1,6 +1,9 @@
 include_rules = [
   "+cc/base",
-  "+cc/output",
+  # TODO(danakj): This should not use LayerTreeFrameSink, which is part of the
+  # layer compositor. It should use CompositorFrameSink instead.
+  "+cc/trees/layer_tree_frame_sink.h",
+  "+cc/trees/layer_tree_frame_sink_client.h",
   "+components/viz/client",
   "+components/viz/common",
   "+components/viz/host",
diff --git a/ui/aura/local/layer_tree_frame_sink_local.cc b/ui/aura/local/layer_tree_frame_sink_local.cc
index ec8c5475..bbf4d59 100644
--- a/ui/aura/local/layer_tree_frame_sink_local.cc
+++ b/ui/aura/local/layer_tree_frame_sink_local.cc
@@ -4,7 +4,7 @@
 
 #include "ui/aura/local/layer_tree_frame_sink_local.h"
 
-#include "cc/output/layer_tree_frame_sink_client.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/surfaces/surface_info.h"
 #include "components/viz/host/host_frame_sink_manager.h"
 #include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
diff --git a/ui/aura/local/layer_tree_frame_sink_local.h b/ui/aura/local/layer_tree_frame_sink_local.h
index ce0f682bc..8a12f5be 100644
--- a/ui/aura/local/layer_tree_frame_sink_local.h
+++ b/ui/aura/local/layer_tree_frame_sink_local.h
@@ -8,7 +8,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "components/viz/host/host_frame_sink_client.h"
diff --git a/ui/aura/mus/DEPS b/ui/aura/mus/DEPS
index d1f347e..f572556 100644
--- a/ui/aura/mus/DEPS
+++ b/ui/aura/mus/DEPS
@@ -1,8 +1,8 @@
 include_rules = [
   "+cc/base/switches.h",
   "+cc/ipc/compositor_frame_sink.mojom.h",
-  "+cc/output/layer_tree_frame_sink_client.h",
-  "+cc/output/layer_tree_frame_sink.h",
+  "+cc/trees/layer_tree_frame_sink_client.h",
+  "+cc/trees/layer_tree_frame_sink.h",
   "+cc/scheduler/begin_frame_source.h",
   "+components/discardable_memory/client/client_discardable_shared_memory_manager.h",
   "+components/viz/client",
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 1252afa0..5ddbcd6e 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -19,7 +19,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/client/capture_client.h"
diff --git a/ui/aura/window_port_for_shutdown.cc b/ui/aura/window_port_for_shutdown.cc
index 8057e47..c29e4faa 100644
--- a/ui/aura/window_port_for_shutdown.cc
+++ b/ui/aura/window_port_for_shutdown.cc
@@ -5,7 +5,7 @@
 #include "ui/aura/window_port_for_shutdown.h"
 
 #include "base/memory/ptr_util.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "ui/aura/window.h"
 
 namespace aura {
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 72a9dd87..7e5fc7632 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -16,7 +16,7 @@
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "build/build_config.h"
-#include "cc/output/layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink.h"
 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/aura/client/capture_client.h"
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 8481c44..69ba8df 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -27,7 +27,7 @@
 #include "cc/base/switches.h"
 #include "cc/input/input_handler.h"
 #include "cc/layers/layer.h"
-#include "cc/output/latency_info_swap_promise.h"
+#include "cc/trees/latency_info_swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_settings.h"
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
diff --git a/ui/compositor/test/fake_context_factory.cc b/ui/compositor/test/fake_context_factory.cc
index 870151a..8d59985 100644
--- a/ui/compositor/test/fake_context_factory.cc
+++ b/ui/compositor/test/fake_context_factory.cc
@@ -8,8 +8,8 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "cc/base/switches.h"
 #include "cc/output/compositor_frame.h"
-#include "cc/output/layer_tree_frame_sink_client.h"
 #include "cc/test/fake_layer_tree_frame_sink.h"
+#include "cc/trees/layer_tree_frame_sink_client.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/frame_sinks/delay_based_time_source.h"
 #include "ui/compositor/compositor_switches.h"
diff --git a/ui/compositor/test/in_process_context_provider.cc b/ui/compositor/test/in_process_context_provider.cc
index ef4918a..0ab5759b 100644
--- a/ui/compositor/test/in_process_context_provider.cc
+++ b/ui/compositor/test/in_process_context_provider.cc
@@ -11,7 +11,6 @@
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
-#include "cc/output/managed_memory_policy.h"
 #include "components/viz/common/gpu/context_cache_controller.h"
 #include "gpu/command_buffer/client/gles2_implementation.h"
 #include "gpu/command_buffer/client/gles2_lib.h"