# Copyright 2017 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("//components/viz/viz.gni") import("//testing/test.gni") viz_component("resource_format") { output_name = "viz_resource_format" defines = [ "VIZ_RESOURCE_FORMAT_IMPLEMENTATION" ] sources = [ "resources/resource_format.h", "resources/resource_format_utils.cc", "resources/resource_format_utils.h", "viz_resource_format_export.h", ] configs = [ "//third_party/khronos:khronos_headers" ] deps = [ "//base", "//skia", "//ui/gfx:buffer_types", ] } viz_component("common") { output_name = "viz_common" defines = [ "VIZ_COMMON_IMPLEMENTATION" ] sources = [ "display/renderer_settings.cc", "display/renderer_settings.h", "features.cc", "features.h", "frame_sinks/begin_frame_args.cc", "frame_sinks/begin_frame_args.h", "frame_sinks/begin_frame_source.cc", "frame_sinks/begin_frame_source.h", "frame_sinks/copy_output_request.cc", "frame_sinks/copy_output_request.h", "frame_sinks/copy_output_result.cc", "frame_sinks/copy_output_result.h", "frame_sinks/copy_output_util.cc", "frame_sinks/copy_output_util.h", "frame_sinks/delay_based_time_source.cc", "frame_sinks/delay_based_time_source.h", "gl_helper.cc", "gl_helper.h", "gl_helper_readback_support.cc", "gl_helper_readback_support.h", "gl_helper_scaling.cc", "gl_helper_scaling.h", "gpu/context_cache_controller.cc", "gpu/context_cache_controller.h", "gpu/context_lost_observer.h", "gpu/context_provider.cc", "gpu/context_provider.h", "gpu/in_process_context_provider.cc", "gpu/in_process_context_provider.h", "gpu/vulkan_context_provider.h", "gpu/vulkan_in_process_context_provider.cc", "gpu/vulkan_in_process_context_provider.h", "hit_test/aggregated_hit_test_region.h", "quads/compositor_frame.cc", "quads/compositor_frame.h", "quads/compositor_frame_metadata.cc", "quads/compositor_frame_metadata.h", "quads/content_draw_quad_base.cc", "quads/content_draw_quad_base.h", "quads/debug_border_draw_quad.cc", "quads/debug_border_draw_quad.h", "quads/draw_quad.cc", "quads/draw_quad.h", "quads/largest_draw_quad.cc", "quads/largest_draw_quad.h", "quads/picture_draw_quad.cc", "quads/picture_draw_quad.h", "quads/render_pass.cc", "quads/render_pass.h", "quads/render_pass_draw_quad.cc", "quads/render_pass_draw_quad.h", "quads/selection.h", "quads/shared_bitmap.cc", "quads/shared_bitmap.h", "quads/shared_quad_state.cc", "quads/shared_quad_state.h", "quads/solid_color_draw_quad.cc", "quads/solid_color_draw_quad.h", "quads/stream_video_draw_quad.cc", "quads/stream_video_draw_quad.h", "quads/surface_draw_quad.cc", "quads/surface_draw_quad.h", "quads/texture_draw_quad.cc", "quads/texture_draw_quad.h", "quads/tile_draw_quad.cc", "quads/tile_draw_quad.h", "quads/yuv_video_draw_quad.cc", "quads/yuv_video_draw_quad.h", "resources/buffer_to_texture_target_map.cc", "resources/buffer_to_texture_target_map.h", "resources/platform_color.h", "resources/release_callback.h", "resources/resource.cc", "resources/resource.h", "resources/resource_fence.h", "resources/resource_id.h", "resources/resource_settings.cc", "resources/resource_settings.h", "resources/resource_texture_hint.h", "resources/resource_type.h", "resources/returned_resource.h", "resources/shared_bitmap_manager.h", "resources/single_release_callback.cc", "resources/single_release_callback.h", "resources/transferable_resource.cc", "resources/transferable_resource.h", "surfaces/frame_sink_id.cc", "surfaces/frame_sink_id.h", "surfaces/frame_sink_id_allocator.h", "surfaces/local_surface_id.cc", "surfaces/local_surface_id.h", "surfaces/local_surface_id_allocator.cc", "surfaces/local_surface_id_allocator.h", "surfaces/sequence_surface_reference_factory.cc", "surfaces/sequence_surface_reference_factory.h", "surfaces/stub_surface_reference_factory.cc", "surfaces/stub_surface_reference_factory.h", "surfaces/surface_id.cc", "surfaces/surface_id.h", "surfaces/surface_info.h", "surfaces/surface_reference_factory.h", "surfaces/surface_reference_owner.h", "surfaces/surface_sequence.h", "surfaces/surface_sequence_generator.cc", "surfaces/surface_sequence_generator.h", "switches.cc", "switches.h", "traced_value.cc", "traced_value.h", "viz_common_export.h", ] deps = [ "//base", # TODO(staraz): cc/base was added because SharedQuadState includes # cc::MathUtil. Remove it once cc/base/math_util* are moved to viz. "//cc/base", "//cc/paint", "//gpu", "//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_interface", "//gpu/command_buffer/service", "//gpu/ipc:gl_in_process_context", "//gpu/skia_bindings:skia_bindings", "//gpu/vulkan:features", "//mojo/public/cpp/bindings", "//skia", "//third_party/libyuv", "//ui/gfx:color_space", "//ui/gfx:geometry_skia", "//ui/gfx/geometry", "//ui/latency", ] public_deps = [ ":resource_format", "//gpu/command_buffer/client", "//gpu/command_buffer/common", "//mojo/public/cpp/bindings", ] } viz_source_set("unit_tests") { testonly = true sources = [ "frame_sinks/begin_frame_args_unittest.cc", "frame_sinks/copy_output_util_unittest.cc", "frame_sinks/delay_based_time_source_unittest.cc", "gl_helper_unittest.cc", "gpu/context_cache_controller_unittest.cc", "quads/draw_quad_unittest.cc", "quads/render_pass_unittest.cc", "resources/buffer_to_texture_target_map_unittest.cc", "resources/platform_color_unittest.cc", "surfaces/surface_sequence_generator_unittest.cc", "yuv_readback_unittest.cc", ] deps = [ ":common", "//base/test:test_support", "//cc:test_support", "//components/viz/test:test_support", "//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_interface", "//gpu/ipc:gl_in_process_context", "//gpu/ipc/common:surface_handle_type", "//media", "//testing/gmock", "//testing/gtest", ] } # Microbenchmark to measure performance of GLHelper code, for use in # debugging, profiling, and optimizing. viz_test("viz_benchmark") { sources = [ "gl_helper_benchmark.cc", ] configs = [ "//build/config/compiler:no_size_t_to_int_warning", "//third_party/khronos:khronos_headers", ] deps = [ ":common", "//base", "//base/test:test_support", "//components/test:run_all_unittests", "//gpu/command_buffer/client", "//gpu/command_buffer/client:gles2_implementation", "//gpu/ipc:gl_in_process_context", "//testing/gmock", "//testing/gtest", "//ui/gfx", ] data_deps = [ "//third_party/mesa:osmesa", ] } viz_source_set("perf_tests") { testonly = true sources = [ "quads/draw_quad_perftest.cc", ] deps = [ ":common", "//base", "//cc/base", "//skia", "//testing/gtest", "//testing/perf", ] }