• 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("//foundation/graphic/graphic_2d/graphic_config.gni")
16import("../render_service_base/config.gni")
17
18## Build libframe_analyzer.so {{{
19config("libframe_analyzer_config") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-Wall",
24    "-Werror",
25    "-g3",
26  ]
27
28  if (current_os != "ohos") {
29    cflags += [
30      "-Wno-c++17-extensions",
31      "-Wno-unused-private-field",
32    ]
33  }
34}
35
36config("libframe_analyzer_public_config") {
37  include_dirs = [ "export" ]
38}
39
40ohos_shared_library("libframe_analyzer") {
41  if (current_os == "ohos") {
42    sources = [
43      "src/frame_collector.cpp",
44      "src/frame_painter.cpp",
45      "src/frame_saver.cpp",
46    ]
47
48    include_dirs = [ "$graphic_2d_root/utils/sandbox" ]
49
50    deps = [ "../../../utils/sandbox:sandbox_utils" ]
51
52    deps += [ "//third_party/skia:skia_ohos" ]
53
54    external_deps = [
55      "c_utils:utils",
56      "hilog:libhilog",
57      "hitrace:hitrace_meter",
58      "init:libbeget_proxy",
59      "init:libbegetutil",
60    ]
61  } else {
62    sources = [
63      "src/mingw/frame_collector.cpp",
64      "src/mingw/frame_painter.cpp",
65    ]
66  }
67
68  if (defined(use_rosen_drawing) && use_rosen_drawing) {
69    defines = [ "USE_ROSEN_DRAWING" ]
70    deps += [ "$rosen_root/modules/2d_graphics:2d_graphics" ]
71  }
72
73  configs = [ ":libframe_analyzer_config" ]
74
75  public_configs = [ ":libframe_analyzer_public_config" ]
76
77  subsystem_name = "graphic"
78  innerapi_tags = [ "platformsdk_indirect" ]
79  part_name = "graphic_2d"
80}
81## Build libframe_analyzer.so }}}
82