| # Copyright 2014 The Chromium Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//build/config/ui.gni") | |
| import("//testing/test.gni") | |
| component("compositor") { | |
| sources = [ | |
| "canvas_painter.cc", | |
| "canvas_painter.h", | |
| "clip_transform_recorder.cc", | |
| "clip_transform_recorder.h", | |
| "closure_animation_observer.cc", | |
| "closure_animation_observer.h", | |
| "compositing_recorder.cc", | |
| "compositing_recorder.h", | |
| "compositor.cc", | |
| "compositor.h", | |
| "compositor_animation_observer.h", | |
| "compositor_export.h", | |
| "compositor_observer.h", | |
| "compositor_switches.cc", | |
| "compositor_switches.h", | |
| "compositor_vsync_manager.cc", | |
| "compositor_vsync_manager.h", | |
| "debug_utils.cc", | |
| "debug_utils.h", | |
| "dip_util.cc", | |
| "dip_util.h", | |
| "float_animation_curve_adapter.cc", | |
| "float_animation_curve_adapter.h", | |
| "layer.cc", | |
| "layer.h", | |
| "layer_animation_delegate.h", | |
| "layer_animation_element.cc", | |
| "layer_animation_element.h", | |
| "layer_animation_observer.cc", | |
| "layer_animation_observer.h", | |
| "layer_animation_sequence.cc", | |
| "layer_animation_sequence.h", | |
| "layer_animator.cc", | |
| "layer_animator.h", | |
| "layer_animator_collection.cc", | |
| "layer_animator_collection.h", | |
| "layer_delegate.h", | |
| "layer_owner.cc", | |
| "layer_owner.h", | |
| "layer_tree_owner.cc", | |
| "layer_tree_owner.h", | |
| "layer_type.h", | |
| "paint_cache.cc", | |
| "paint_cache.h", | |
| "paint_context.cc", | |
| "paint_context.h", | |
| "paint_recorder.cc", | |
| "paint_recorder.h", | |
| "reflector.cc", | |
| "reflector.h", | |
| "scoped_animation_duration_scale_mode.cc", | |
| "scoped_animation_duration_scale_mode.h", | |
| "scoped_layer_animation_settings.cc", | |
| "scoped_layer_animation_settings.h", | |
| "transform_animation_curve_adapter.cc", | |
| "transform_animation_curve_adapter.h", | |
| ] | |
| defines = [ "COMPOSITOR_IMPLEMENTATION" ] | |
| deps = [ | |
| "//base", | |
| "//base/third_party/dynamic_annotations", | |
| "//cc", | |
| "//cc/surfaces", | |
| "//cc/surfaces:surface_id", | |
| "//gpu/command_buffer/common", | |
| "//skia", | |
| "//ui/gfx", | |
| "//ui/gfx/geometry", | |
| "//ui/gl", | |
| ] | |
| if (is_win && use_aura) { | |
| # TODO(sky): before we make this real need to remove | |
| # IDR_BITMAP_BRUSH_IMAGE. | |
| deps += [ | |
| "//ui/resources", | |
| "//third_party/angle:libEGL", | |
| "//third_party/angle:libGLESv2", | |
| ] | |
| } | |
| } | |
| source_set("test_support") { | |
| testonly = true | |
| sources = [ | |
| "test/context_factories_for_test.cc", | |
| "test/context_factories_for_test.h", | |
| "test/draw_waiter_for_test.cc", | |
| "test/draw_waiter_for_test.h", | |
| "test/in_process_context_factory.cc", | |
| "test/in_process_context_factory.h", | |
| "test/in_process_context_provider.cc", | |
| "test/in_process_context_provider.h", | |
| "test/layer_animator_test_controller.cc", | |
| "test/layer_animator_test_controller.h", | |
| "test/test_compositor_host.h", | |
| "test/test_compositor_host_mac.mm", | |
| "test/test_compositor_host_win.cc", | |
| "test/test_layer_animation_delegate.cc", | |
| "test/test_layer_animation_delegate.h", | |
| "test/test_layer_animation_observer.cc", | |
| "test/test_layer_animation_observer.h", | |
| "test/test_layers.cc", | |
| "test/test_layers.h", | |
| "test/test_suite.cc", | |
| "test/test_suite.h", | |
| "test/test_utils.cc", | |
| "test/test_utils.h", | |
| ] | |
| public_deps = [ | |
| ":compositor", | |
| ] | |
| deps = [ | |
| "//base/test:test_support", | |
| "//cc", | |
| "//cc/surfaces", | |
| "//cc:test_support", | |
| "//gpu/command_buffer/client:gl_in_process_context", | |
| "//gpu/command_buffer/client:gles2_c_lib", | |
| "//gpu/command_buffer/client:gles2_implementation", | |
| "//gpu/command_buffer/common:gles2_utils", | |
| "//gpu/skia_bindings", | |
| "//skia", | |
| "//testing/gtest", | |
| "//ui/base", | |
| "//ui/gfx", | |
| "//ui/gfx/geometry", | |
| "//ui/gl", | |
| ] | |
| if (use_x11) { | |
| configs += [ "//build/config/linux:x11" ] | |
| deps += [ "//ui/gfx/x" ] | |
| } | |
| if (use_ozone) { | |
| sources += [ "test/test_compositor_host_ozone.cc" ] | |
| } else if (use_x11) { | |
| sources += [ "test/test_compositor_host_x11.cc" ] | |
| } | |
| } | |
| if (!is_android) { | |
| # TODO(GYP): Delete this after we've converted everything to GN. | |
| # The _run targets exist only for compatibility w/ GYP. | |
| group("compositor_unittests_run") { | |
| testonly = true | |
| deps = [ | |
| ":compositor_unittests", | |
| ] | |
| } | |
| test("compositor_unittests") { | |
| sources = [ | |
| "compositor_unittest.cc", | |
| "layer_animation_element_unittest.cc", | |
| "layer_animation_sequence_unittest.cc", | |
| "layer_animator_unittest.cc", | |
| "layer_owner_unittest.cc", | |
| "layer_unittest.cc", | |
| "run_all_unittests.cc", | |
| "transform_animation_curve_adapter_unittest.cc", | |
| ] | |
| data = [ | |
| "//ui/gfx/test/data/compositor/", | |
| ] | |
| deps = [ | |
| ":compositor", | |
| ":test_support", | |
| "//base", | |
| "//base/allocator", | |
| "//base/test:test_support", | |
| "//cc", | |
| "//cc:test_support", | |
| "//skia", | |
| "//testing/gmock", | |
| "//testing/gtest", | |
| "//ui/base", | |
| "//ui/gfx", | |
| "//ui/gfx/geometry", | |
| "//ui/gl", | |
| "//ui/resources", | |
| ] | |
| if (is_linux) { | |
| deps += [ "//third_party/mesa:osmesa" ] | |
| } | |
| } | |
| } |