chromium/ui/gfx/animation/keyframe/BUILD.gn

# Copyright 2021 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/ui.gni")

keyframe_animation_remove_configs = []
keyframe_animation_add_configs = [
  "//build/config:precompiled_headers",
  "//build/config/compiler:wexit_time_destructors",
]

if (!is_debug) {
  keyframe_animation_remove_configs +=
      [ "//build/config/compiler:default_optimization" ]
  keyframe_animation_add_configs += [ "//build/config/compiler:optimize_max" ]
}

component("keyframe") {
  sources = [
    "animation_curve.cc",
    "animation_curve.h",
    "keyframe_animation_export.h",
    "keyframe_effect.cc",
    "keyframe_effect.h",
    "keyframe_model.cc",
    "keyframe_model.h",
    "keyframed_animation_curve-inl.h",
    "keyframed_animation_curve.cc",
    "keyframed_animation_curve.h",
    "target_property.h",
    "timing_function.cc",
    "timing_function.h",
    "transition.cc",
    "transition.h",
  ]

  defines = [ "GFX_KEYFRAME_ANIMATION_IMPLEMENTATION=1" ]

  deps = [
    "//base",
    "//skia",
    "//ui/gfx/animation",
    "//ui/gfx/geometry",
    "//ui/gfx/geometry:geometry_skia",
  ]

  configs += keyframe_animation_add_configs
  configs -= keyframe_animation_remove_configs
}