Commit 78ed387b authored by kylechar's avatar kylechar Committed by Commit Bot

viz: Tighten components/viz/service DEPS.

There was a rule that let anything components/viz/service have a
dependency on anything else. This wasn't intended. Invert that rule and
explicitly allow DEPS where they should exist.

Bug: none
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ida5c3f86487807b8ae2ad9bee01cdd8227b6ed9d
Reviewed-on: https://chromium-review.googlesource.com/892101
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533108}
parent 915984bd
...@@ -121,8 +121,12 @@ compositor (typically thought of as SwapBuffers), as well as the use of ...@@ -121,8 +121,12 @@ compositor (typically thought of as SwapBuffers), as well as the use of
overlays. overlays.
| Can depend on: | | Can depend on: |
|:---------------| |:--------------------------------------|
| viz/common/* | | viz/common/* |
| viz/service/display/<some_interfaces> |
Dependencies onto viz/service/display should generally only be for interfaces
that the embedder must provide to the display.
#### service/frame_sinks #### service/frame_sinks
**Frame sinks**: This component implements the Mojo interfaces to send frames, **Frame sinks**: This component implements the Mojo interfaces to send frames,
...@@ -131,9 +135,11 @@ compositing service. It receives and organizes relationships between what should ...@@ -131,9 +135,11 @@ compositing service. It receives and organizes relationships between what should
be composited. be composited.
| Can depend on: | | Can depend on: |
|:----------------------| |:------------------------------|
| viz/common/* | | viz/common/* |
| viz/service/display/ | | viz/service/display/ |
| viz/service/display_embedder/ |
| viz/service/hit_test/ |
| viz/service/surfaces/ | | viz/service/surfaces/ |
#### service/gl #### service/gl
......
...@@ -4,7 +4,8 @@ include_rules = [ ...@@ -4,7 +4,8 @@ include_rules = [
"+cc", "+cc",
"-components/viz/common/features.h", "-components/viz/common/features.h",
"-components/viz/common/switches.h", "-components/viz/common/switches.h",
"+components/viz/service", "-components/viz/service",
"+components/viz/service/viz_service_export.h",
"+services/viz/privileged/interfaces", "+services/viz/privileged/interfaces",
"+services/viz/public/interfaces", "+services/viz/public/interfaces",
"+third_party/skia", "+third_party/skia",
......
...@@ -7,6 +7,7 @@ include_rules = [ ...@@ -7,6 +7,7 @@ include_rules = [
"+cc/output", "+cc/output",
"+cc/resources", "+cc/resources",
"+cc/scheduler", "+cc/scheduler",
"+components/viz/service/surfaces",
"+gpu/command_buffer/client", "+gpu/command_buffer/client",
"+gpu/command_buffer/common", "+gpu/command_buffer/common",
"+gpu/GLES2", "+gpu/GLES2",
...@@ -28,6 +29,7 @@ specific_include_rules = { ...@@ -28,6 +29,7 @@ specific_include_rules = {
], ],
".*_(unit|pixel|perf)test\.cc": [ ".*_(unit|pixel|perf)test\.cc": [
"+cc/test", "+cc/test",
"+components/viz/service/display_embedder",
"+components/viz/service/frame_sinks", "+components/viz/service/frame_sinks",
"+components/viz/test", "+components/viz/test",
"+gpu/GLES2", "+gpu/GLES2",
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "components/viz/common/quads/solid_color_draw_quad.h" #include "components/viz/common/quads/solid_color_draw_quad.h"
#include "components/viz/common/quads/surface_draw_quad.h" #include "components/viz/common/quads/surface_draw_quad.h"
#include "components/viz/common/quads/texture_draw_quad.h" #include "components/viz/common/quads/texture_draw_quad.h"
#include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
#include "components/viz/service/surfaces/surface.h" #include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_client.h" #include "components/viz/service/surfaces/surface_client.h"
#include "components/viz/service/surfaces/surface_manager.h" #include "components/viz/service/surfaces/surface_manager.h"
......
...@@ -6,6 +6,11 @@ include_rules = [ ...@@ -6,6 +6,11 @@ include_rules = [
"+cc/output", "+cc/output",
"+cc/resources", "+cc/resources",
"+cc/scheduler", "+cc/scheduler",
"+components/viz/service/display/output_surface_client.h",
"+components/viz/service/display/output_surface_frame.h",
"+components/viz/service/display/output_surface.h",
"+components/viz/service/display/overlay_candidate_validator.h",
"+components/viz/service/display/software_output_device.h",
"+gpu/GLES2", "+gpu/GLES2",
"+gpu/command_buffer/client", "+gpu/command_buffer/client",
"+gpu/command_buffer/common", "+gpu/command_buffer/common",
...@@ -23,6 +28,13 @@ include_rules = [ ...@@ -23,6 +28,13 @@ include_rules = [
"+ui/gl", "+ui/gl",
"+ui/latency", "+ui/latency",
"+ui/ozone/public", "+ui/ozone/public",
# TODO(danakj): Double check the layering for these dependencies.
"+components/viz/service/display/overlay_processor.h",
"+components/viz/service/display/overlay_strategy_fullscreen.h",
"+components/viz/service/display/overlay_strategy_single_on_top.h",
"+components/viz/service/display/overlay_strategy_underlay_cast.h",
"+components/viz/service/display/overlay_strategy_underlay.h",
] ]
specific_include_rules = { specific_include_rules = {
...@@ -30,6 +42,15 @@ specific_include_rules = { ...@@ -30,6 +42,15 @@ specific_include_rules = {
"+cc/test", "+cc/test",
"+third_party/khronos/GLES2", "+third_party/khronos/GLES2",
], ],
# TODO(kylechar): Move this class to components/viz/service/frame_sinks/.
"external_begin_frame_controller_impl.h": [
"+components/viz/service/display/display.h",
],
# TODO(kylechar): Break these dependencies.
"gpu_display_provider.cc": [
"+components/viz/service/display/display.h",
"+components/viz/service/display/display_scheduler.h",
],
"software_output_device_ozone_unittest.cc": [ "software_output_device_ozone_unittest.cc": [
"+ui/compositor", "+ui/compositor",
"+ui/gl", "+ui/gl",
......
...@@ -4,6 +4,9 @@ include_rules = [ ...@@ -4,6 +4,9 @@ include_rules = [
"+cc/base", "+cc/base",
"+cc/ipc", "+cc/ipc",
"+cc/scheduler", "+cc/scheduler",
"+components/viz/service/display",
"+components/viz/service/display_embedder",
"+components/viz/service/hit_test",
"+components/viz/service/surfaces", "+components/viz/service/surfaces",
"+gpu/ipc/common", "+gpu/ipc/common",
"+mojo/public/cpp/bindings", "+mojo/public/cpp/bindings",
......
...@@ -5,7 +5,12 @@ include_rules = [ ...@@ -5,7 +5,12 @@ include_rules = [
] ]
specific_include_rules = { specific_include_rules = {
# TODO(riajiang): This dependency needs to be removed.
"hit_test_manager.cc": [
"+components/viz/service/frame_sinks/frame_sink_manager_impl.h",
],
"hit_test_aggregator_unittest.cc": [ "hit_test_aggregator_unittest.cc": [
"+components/viz/host/host_frame_sink_manager.h", "+components/viz/host/host_frame_sink_manager.h",
] "+components/viz/service/frame_sinks",
],
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment