Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f2b7df8 authored by Vova Sharaienko's avatar Vova Sharaienko
Browse files

Removed dependency on libstatslog

- created dedicated log modules for surfaceflinger

Flag: EXEMPT bugfix
Bug: 402950016
Test: build should pass, refactoring CL existing tests pass
Change-Id: I06a8327b5bcb7e7a9293397e1d349faaef63eef8
parent dfa593d7
Loading
Loading
Loading
Loading
+39 −7
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ cc_defaults {
        "libnativewindow",
        "libnativewindow",
        "libprocessgroup",
        "libprocessgroup",
        "libprotobuf-cpp-lite",
        "libprotobuf-cpp-lite",
        "libstatslog_surfaceflinger",
        "libstatslog_surfaceflinger_bootstrap",
        "libsync",
        "libsync",
        "libui",
        "libui",
        "libutils",
        "libutils",
@@ -346,10 +346,10 @@ cc_library_shared {
}
}


cc_library {
cc_library {
    name: "libstatslog_surfaceflinger",
    name: "libstatslog_surfaceflinger_bootstrap",
    generated_sources: ["statslog_surfaceflinger.cpp"],
    generated_sources: ["statslog_surfaceflinger_bootstrap.cpp"],
    generated_headers: ["statslog_surfaceflinger.h"],
    generated_headers: ["statslog_surfaceflinger_bootstrap.h"],
    export_generated_headers: ["statslog_surfaceflinger.h"],
    export_generated_headers: ["statslog_surfaceflinger_bootstrap.h"],
    shared_libs: [
    shared_libs: [
        "android.os.statsbootstrap_aidl-cpp",
        "android.os.statsbootstrap_aidl-cpp",
        "libbinder",
        "libbinder",
@@ -358,11 +358,43 @@ cc_library {
    ],
    ],
}
}


genrule {
    name: "statslog_surfaceflinger_bootstrap.h",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_surfaceflinger_bootstrap.h" +
        " --module surfaceflinger --namespace android,surfaceflinger,stats --bootstrap",
    out: [
        "statslog_surfaceflinger_bootstrap.h",
    ],
}

genrule {
    name: "statslog_surfaceflinger_bootstrap.cpp",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_surfaceflinger_bootstrap.cpp" +
        " --module surfaceflinger --namespace android,surfaceflinger,stats" +
        " --importHeader statslog_surfaceflinger_bootstrap.h --bootstrap",
    out: [
        "statslog_surfaceflinger_bootstrap.cpp",
    ],
}

cc_library {
    name: "libstatslog_surfaceflinger",
    generated_sources: ["statslog_surfaceflinger.cpp"],
    generated_headers: ["statslog_surfaceflinger.h"],
    export_generated_headers: ["statslog_surfaceflinger.h"],
    shared_libs: [
        "libstatspull",
        "libstatssocket",
    ],
}

genrule {
genrule {
    name: "statslog_surfaceflinger.h",
    name: "statslog_surfaceflinger.h",
    tools: ["stats-log-api-gen"],
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_surfaceflinger.h" +
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_surfaceflinger.h" +
        " --module surfaceflinger --namespace android,surfaceflinger,stats --bootstrap",
        " --module surfaceflinger --namespace android,surfaceflinger,stats",
    out: [
    out: [
        "statslog_surfaceflinger.h",
        "statslog_surfaceflinger.h",
    ],
    ],
@@ -373,7 +405,7 @@ genrule {
    tools: ["stats-log-api-gen"],
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_surfaceflinger.cpp" +
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_surfaceflinger.cpp" +
        " --module surfaceflinger --namespace android,surfaceflinger,stats" +
        " --module surfaceflinger --namespace android,surfaceflinger,stats" +
        " --importHeader statslog_surfaceflinger.h --bootstrap",
        " --importHeader statslog_surfaceflinger.h",
    out: [
    out: [
        "statslog_surfaceflinger.cpp",
        "statslog_surfaceflinger.cpp",
    ],
    ],
+1 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@
#include <renderengine/RenderEngine.h>
#include <renderengine/RenderEngine.h>
#include <renderengine/impl/ExternalTexture.h>
#include <renderengine/impl/ExternalTexture.h>
#include <scheduler/FrameTargeter.h>
#include <scheduler/FrameTargeter.h>
#include <statslog_surfaceflinger.h>
#include <statslog_surfaceflinger_bootstrap.h>
#include <sys/types.h>
#include <sys/types.h>
#include <ui/ColorSpace.h>
#include <ui/ColorSpace.h>
#include <ui/DebugUtils.h>
#include <ui/DebugUtils.h>
+1 −1
Original line number Original line Diff line number Diff line
@@ -156,7 +156,7 @@ cc_defaults {
        "libpowermanager",
        "libpowermanager",
        "libprocessgroup",
        "libprocessgroup",
        "libprotobuf-cpp-lite",
        "libprotobuf-cpp-lite",
        "libstatslog_surfaceflinger",
        "libstatslog_surfaceflinger_bootstrap",
        "libsync",
        "libsync",
        "libtracing_perfetto",
        "libtracing_perfetto",
        "libui",
        "libui",