• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("../render_service_base/config.gni")
16
17## Build libframe_analyzer.so {{{
18config("libframe_analyzer_config") {
19  visibility = [ ":*" ]
20
21  cflags = [
22    "-Wall",
23    "-Werror",
24    "-g3",
25  ]
26
27  if (current_os != "ohos") {
28    cflags += [
29      "-Wno-c++17-extensions",
30      "-Wno-unused-private-field",
31    ]
32  }
33}
34
35config("libframe_analyzer_public_config") {
36  include_dirs = [ "export" ]
37}
38
39ohos_shared_library("libframe_analyzer") {
40  if (current_os == "ohos") {
41    sources = [
42      "src/frame_collector.cpp",
43      "src/frame_painter.cpp",
44      "src/frame_saver.cpp",
45    ]
46
47    include_dirs = [ "//foundation/graphic/graphic_2d/utils/sandbox" ]
48
49    deps = [ "../../../utils/sandbox:sandbox_utils" ]
50
51    if (defined(use_new_skia) && use_new_skia) {
52      deps += [ "//third_party/skia:skia_ohos" ]
53    } else {
54      deps += [ "//third_party/flutter/build/skia:ace_skia_ohos" ]
55    }
56
57    external_deps = [
58      "c_utils:utils",
59      "hilog:libhilog",
60      "hitrace:hitrace_meter",
61      "init:libbeget_proxy",
62      "init:libbegetutil",
63    ]
64  } else {
65    sources = [
66      "src/mingw/frame_collector.cpp",
67      "src/mingw/frame_painter.cpp",
68    ]
69  }
70
71  if (defined(use_rosen_drawing) && use_rosen_drawing) {
72    defines = [ "USE_ROSEN_DRAWING" ]
73    deps += [ "$rosen_root/modules/2d_graphics:2d_graphics" ]
74  }
75
76  configs = [ ":libframe_analyzer_config" ]
77
78  public_configs = [ ":libframe_analyzer_public_config" ]
79
80  subsystem_name = "graphic"
81  innerapi_tags = [ "platformsdk_indirect" ]
82  part_name = "graphic_2d"
83}
84## Build libframe_analyzer.so }}}
85