Commit 409897d0 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Convert //ui to not depend on set_sources_assignment_filter()

set_sources_assignment_filter() is considered as a mis-feature
of gn (as it makes it difficult to reason about the BUILD.gn
files individually).

Convert BUILD.gn files below //ui to instead use conditional
to include source files only on the platformn where they are
used.

The conversion was done by using a modified version of gn that
display all files filtered by set_sources_assignment_filter()
and updating the BUILD.gn files manually to explicitly add the
source files only on the platform that used them.

This CL was uploaded by git cl split.

Bug: 1018739
Change-Id: I6300c4e09253c6d28cb48fcf05ac3697a5877516
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930570Reviewed-by: default avatarenne <enne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718578}
parent 073cdcb1
...@@ -6,6 +6,12 @@ import("//build/config/jumbo.gni") ...@@ -6,6 +6,12 @@ import("//build/config/jumbo.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//testing/test.gni") import("//testing/test.gni")
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See build/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
jumbo_component("compositor") { jumbo_component("compositor") {
sources = [ sources = [
"callback_layer_animation_observer.cc", "callback_layer_animation_observer.cc",
...@@ -63,8 +69,6 @@ jumbo_component("compositor") { ...@@ -63,8 +69,6 @@ jumbo_component("compositor") {
"paint_recorder.cc", "paint_recorder.cc",
"paint_recorder.h", "paint_recorder.h",
"property_change_reason.h", "property_change_reason.h",
"recyclable_compositor_mac.cc",
"recyclable_compositor_mac.h",
"reflector.cc", "reflector.cc",
"reflector.h", "reflector.h",
"scoped_animation_duration_scale_mode.cc", "scoped_animation_duration_scale_mode.cc",
...@@ -77,6 +81,13 @@ jumbo_component("compositor") { ...@@ -77,6 +81,13 @@ jumbo_component("compositor") {
"transform_recorder.h", "transform_recorder.h",
] ]
if (is_mac) {
sources += [
"recyclable_compositor_mac.cc",
"recyclable_compositor_mac.h",
]
}
defines = [ "COMPOSITOR_IMPLEMENTATION" ] defines = [ "COMPOSITOR_IMPLEMENTATION" ]
public_deps = [ public_deps = [
...@@ -130,9 +141,6 @@ jumbo_static_library("test_support") { ...@@ -130,9 +141,6 @@ jumbo_static_library("test_support") {
"test/multi_layer_animator_test_controller.h", "test/multi_layer_animator_test_controller.h",
"test/multi_layer_animator_test_controller_delegate.h", "test/multi_layer_animator_test_controller_delegate.h",
"test/test_compositor_host.h", "test/test_compositor_host.h",
"test/test_compositor_host_android.cc",
"test/test_compositor_host_mac.mm",
"test/test_compositor_host_win.cc",
"test/test_context_factories.cc", "test/test_context_factories.cc",
"test/test_context_factories.h", "test/test_context_factories.h",
"test/test_layer_animation_delegate.cc", "test/test_layer_animation_delegate.cc",
...@@ -147,6 +155,18 @@ jumbo_static_library("test_support") { ...@@ -147,6 +155,18 @@ jumbo_static_library("test_support") {
"test/test_utils.h", "test/test_utils.h",
] ]
if (is_android) {
sources += [ "test/test_compositor_host_android.cc" ]
}
if (is_mac) {
sources += [ "test/test_compositor_host_mac.mm" ]
}
if (is_win) {
sources += [ "test/test_compositor_host_win.cc" ]
}
public_deps = [ public_deps = [
":compositor", ":compositor",
] ]
......
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