| # Copyright 2014 The Chromium Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//build/config/apple/mobile_config.gni") | |
| import("//testing/test.gni") | |
| component("accelerated_widget_mac") { | |
| sources = [ | |
| "accelerated_widget_mac_export.h", | |
| "ca_layer_frame_sink.h", | |
| "ca_layer_frame_sink.mm", | |
| "ca_layer_tree_coordinator.h", | |
| "ca_layer_tree_coordinator.mm", | |
| "ca_renderer_layer_tree.h", | |
| "ca_renderer_layer_tree.mm", | |
| ] | |
| defines = [ | |
| "ACCELERATED_WIDGET_MAC_IMPLEMENTATION", | |
| "GL_SILENCE_DEPRECATION", | |
| ] | |
| frameworks = [ | |
| "AVFoundation.framework", | |
| "CoreGraphics.framework", | |
| "Foundation.framework", | |
| "CoreFoundation.framework", | |
| "CoreMedia.framework", | |
| "CoreVideo.framework", | |
| "IOSurface.framework", | |
| "QuartzCore.framework", | |
| ] | |
| if (is_ios) { | |
| sources += [ | |
| "ca_layer_frame_sink_provider.h", | |
| "ca_layer_frame_sink_provider.mm", | |
| ] | |
| if (target_platform == "iphoneos") { | |
| frameworks += [ "BrowserEngineKit.framework" ] | |
| } | |
| # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and | |
| # enable the diagnostic by removing this line. | |
| configs += [ "//build/config/compiler:no_exit_time_destructors" ] | |
| } | |
| if (is_mac) { | |
| sources += [ | |
| "accelerated_widget_mac.h", | |
| "accelerated_widget_mac.mm", | |
| "accelerated_widget_mac_export.h", | |
| "ca_transaction_observer.h", | |
| "ca_transaction_observer.mm", | |
| "window_resize_helper_mac.cc", | |
| "window_resize_helper_mac.h", | |
| ] | |
| frameworks += [ "OpenGL.framework" ] | |
| # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and | |
| # enable the diagnostic by removing this line. | |
| configs += [ "//build/config/compiler:no_exit_time_destructors" ] | |
| } | |
| if (is_mac || (is_ios && target_platform != "iphoneos")) { | |
| sources += [ | |
| "display_ca_layer_tree.h", | |
| "display_ca_layer_tree.mm", | |
| ] | |
| } | |
| deps = [ | |
| "//base", | |
| "//components/metal_util", | |
| "//media", | |
| "//skia", | |
| "//ui/base", | |
| "//ui/events", | |
| "//ui/events:events_base", | |
| "//ui/gfx", | |
| "//ui/gfx/geometry", | |
| "//ui/gl", | |
| ] | |
| } | |
| test("accelerated_widget_mac_unittests") { | |
| configs += [ "//build/config:precompiled_headers" ] | |
| sources = [ "ca_layer_tree_unittest_mac.mm" ] | |
| deps = [ | |
| ":accelerated_widget_mac", | |
| "//base", | |
| "//base/test:run_all_unittests", | |
| "//base/test:test_support", | |
| "//components/metal_util", | |
| "//skia", | |
| "//testing/gmock", | |
| "//testing/gtest", | |
| "//ui/gfx:test_support", | |
| "//ui/gl", | |
| ] | |
| frameworks = [ | |
| "AVFoundation.framework", | |
| "QuartzCore.framework", | |
| ] | |
| } |