# 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("//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",
"display_ca_layer_tree.h",
"display_ca_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" ]
}
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",
"io_surface_context.h",
"io_surface_context.mm",
"window_resize_helper_mac.cc",
"window_resize_helper_mac.h",
]
frameworks += [ "OpenGL.framework" ]
}
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",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//ui/gfx:test_support",
"//ui/gl",
]
frameworks = [
"AVFoundation.framework",
"QuartzCore.framework",
]
}