| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| declare_args() { |
| # 0 - use normal swapchain |
| # 1 - use vulkan swapchain, but wait for real display |
| # 2 - use vulkan swapchain with fixed-size fake display |
| if (target_cpu == "arm64") { |
| scenic_vulkan_swapchain = 1 |
| } else { |
| scenic_vulkan_swapchain = 0 |
| } |
| scenic_ignore_vsync = false |
| } |
| |
| config("common_include_dirs") { |
| include_dirs = [ |
| "//garnet", |
| "//third_party/glm", |
| ] |
| } |
| |
| config("swapchain") { |
| defines = [ |
| "SCENIC_VULKAN_SWAPCHAIN=$scenic_vulkan_swapchain", |
| "SCENIC_IGNORE_VSYNC=$scenic_ignore_vsync", |
| ] |
| } |
| |
| source_set("gfx") { |
| sources = [ |
| "displays/display.cc", |
| "displays/display.h", |
| "displays/display_manager.cc", |
| "displays/display_manager.h", |
| "displays/display_watcher.cc", |
| "displays/display_watcher.h", |
| "engine/engine.cc", |
| "engine/engine.h", |
| "engine/frame_scheduler.cc", |
| "engine/frame_scheduler.h", |
| "engine/frame_timings.cc", |
| "engine/frame_timings.h", |
| "engine/hit.h", |
| "engine/hit_tester.cc", |
| "engine/hit_tester.h", |
| "engine/object_linker.cc", |
| "engine/object_linker.h", |
| "engine/resource_linker.cc", |
| "engine/resource_linker.h", |
| "engine/resource_map.cc", |
| "engine/resource_map.h", |
| "engine/session.cc", |
| "engine/session.h", |
| "engine/session_handler.cc", |
| "engine/session_handler.h", |
| "engine/session_manager.cc", |
| "engine/session_manager.h", |
| "engine/unresolved_imports.cc", |
| "engine/unresolved_imports.h", |
| "engine/update_scheduler.h", |
| "gfx_system.cc", |
| "gfx_system.h", |
| "resources/buffer.cc", |
| "resources/buffer.h", |
| "resources/camera.cc", |
| "resources/camera.h", |
| "resources/compositor/compositor.cc", |
| "resources/compositor/compositor.h", |
| "resources/compositor/display_compositor.cc", |
| "resources/compositor/display_compositor.h", |
| "resources/compositor/layer.cc", |
| "resources/compositor/layer.h", |
| "resources/compositor/layer_stack.cc", |
| "resources/compositor/layer_stack.h", |
| "resources/dump_visitor.cc", |
| "resources/dump_visitor.h", |
| "resources/gpu_image.cc", |
| "resources/gpu_image.h", |
| "resources/gpu_memory.cc", |
| "resources/gpu_memory.h", |
| "resources/host_image.cc", |
| "resources/host_image.h", |
| "resources/host_memory.cc", |
| "resources/host_memory.h", |
| "resources/image.cc", |
| "resources/image.h", |
| "resources/image_base.cc", |
| "resources/image_base.h", |
| "resources/image_pipe.cc", |
| "resources/image_pipe.h", |
| "resources/image_pipe_handler.cc", |
| "resources/image_pipe_handler.h", |
| "resources/import.cc", |
| "resources/import.h", |
| "resources/lights/ambient_light.cc", |
| "resources/lights/ambient_light.h", |
| "resources/lights/directional_light.cc", |
| "resources/lights/directional_light.h", |
| "resources/lights/light.cc", |
| "resources/lights/light.h", |
| "resources/material.cc", |
| "resources/material.h", |
| "resources/memory.cc", |
| "resources/memory.h", |
| "resources/nodes/entity_node.cc", |
| "resources/nodes/entity_node.h", |
| "resources/nodes/node.cc", |
| "resources/nodes/node.h", |
| "resources/nodes/opacity_node.cc", |
| "resources/nodes/opacity_node.h", |
| "resources/nodes/scene.cc", |
| "resources/nodes/scene.h", |
| "resources/nodes/shape_node.cc", |
| "resources/nodes/shape_node.h", |
| "resources/nodes/traversal.h", |
| "resources/nodes/variable_binding.cc", |
| "resources/nodes/variable_binding.h", |
| "resources/renderers/renderer.cc", |
| "resources/renderers/renderer.h", |
| "resources/resource.cc", |
| "resources/resource.h", |
| "resources/resource_type_info.h", |
| "resources/resource_visitor.cc", |
| "resources/resource_visitor.h", |
| "resources/shapes/circle_shape.cc", |
| "resources/shapes/circle_shape.h", |
| "resources/shapes/mesh_shape.cc", |
| "resources/shapes/mesh_shape.h", |
| "resources/shapes/planar_shape.cc", |
| "resources/shapes/planar_shape.h", |
| "resources/shapes/rectangle_shape.cc", |
| "resources/shapes/rectangle_shape.h", |
| "resources/shapes/rounded_rectangle_shape.cc", |
| "resources/shapes/rounded_rectangle_shape.h", |
| "resources/shapes/shape.cc", |
| "resources/shapes/shape.h", |
| "resources/stereo_camera.cc", |
| "resources/stereo_camera.h", |
| "resources/variable.cc", |
| "resources/variable.h", |
| "resources/view.cc", |
| "resources/view.h", |
| "resources/view_holder.cc", |
| "resources/view_holder.h", |
| "screenshotter.cc", |
| "screenshotter.h", |
| "swapchain/display_swapchain.cc", |
| "swapchain/display_swapchain.h", |
| "swapchain/swapchain.h", |
| "swapchain/vulkan_display_swapchain.cc", |
| "swapchain/vulkan_display_swapchain.h", |
| "util/event_timestamper.cc", |
| "util/event_timestamper.h", |
| "util/image_formats.cc", |
| "util/image_formats.h", |
| "util/unwrap.h", |
| "util/vulkan_utils.cc", |
| "util/vulkan_utils.h", |
| "util/wrap.h", |
| ] |
| |
| public_configs = [ ":common_include_dirs" ] |
| |
| configs += [ ":swapchain" ] |
| |
| public_deps = [ |
| "//garnet/lib/ui/scenic", |
| "//garnet/public/fidl/fuchsia.math", |
| "//garnet/public/fidl/fuchsia.ui.gfx", |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/escher", |
| "//garnet/public/lib/fidl/cpp", |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/fxl", |
| "//garnet/public/lib/ui/geometry/cpp", |
| "//garnet/public/lib/vulkan", |
| "//zircon/public/lib/fit", |
| ] |
| |
| deps = [ |
| "//garnet/lib/ui/yuv", |
| "//garnet/public/lib/escher/util:check_vulkan_support", |
| "//garnet/public/lib/images/cpp", |
| "//garnet/public/lib/ui/scenic/cpp:commands", |
| "//zircon/public/fidl/fuchsia-display", |
| "//zircon/public/lib/trace", |
| ] |
| } |