Skip to content

Commit f08666b

Browse files
Vova SharaienkoAndroid (Google) Code Review
authored andcommitted
Merge "Removed dependency on libstatslog" into main
2 parents 6c5c041 + 3f2b7df commit f08666b

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

services/surfaceflinger/Android.bp

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cc_defaults {
8484
"libnativewindow",
8585
"libprocessgroup",
8686
"libprotobuf-cpp-lite",
87-
"libstatslog_surfaceflinger",
87+
"libstatslog_surfaceflinger_bootstrap",
8888
"libsync",
8989
"libui",
9090
"libutils",
@@ -346,10 +346,10 @@ cc_library_shared {
346346
}
347347

348348
cc_library {
349-
name: "libstatslog_surfaceflinger",
350-
generated_sources: ["statslog_surfaceflinger.cpp"],
351-
generated_headers: ["statslog_surfaceflinger.h"],
352-
export_generated_headers: ["statslog_surfaceflinger.h"],
349+
name: "libstatslog_surfaceflinger_bootstrap",
350+
generated_sources: ["statslog_surfaceflinger_bootstrap.cpp"],
351+
generated_headers: ["statslog_surfaceflinger_bootstrap.h"],
352+
export_generated_headers: ["statslog_surfaceflinger_bootstrap.h"],
353353
shared_libs: [
354354
"android.os.statsbootstrap_aidl-cpp",
355355
"libbinder",
@@ -358,11 +358,43 @@ cc_library {
358358
],
359359
}
360360

361+
genrule {
362+
name: "statslog_surfaceflinger_bootstrap.h",
363+
tools: ["stats-log-api-gen"],
364+
cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_surfaceflinger_bootstrap.h" +
365+
" --module surfaceflinger --namespace android,surfaceflinger,stats --bootstrap",
366+
out: [
367+
"statslog_surfaceflinger_bootstrap.h",
368+
],
369+
}
370+
371+
genrule {
372+
name: "statslog_surfaceflinger_bootstrap.cpp",
373+
tools: ["stats-log-api-gen"],
374+
cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_surfaceflinger_bootstrap.cpp" +
375+
" --module surfaceflinger --namespace android,surfaceflinger,stats" +
376+
" --importHeader statslog_surfaceflinger_bootstrap.h --bootstrap",
377+
out: [
378+
"statslog_surfaceflinger_bootstrap.cpp",
379+
],
380+
}
381+
382+
cc_library {
383+
name: "libstatslog_surfaceflinger",
384+
generated_sources: ["statslog_surfaceflinger.cpp"],
385+
generated_headers: ["statslog_surfaceflinger.h"],
386+
export_generated_headers: ["statslog_surfaceflinger.h"],
387+
shared_libs: [
388+
"libstatspull",
389+
"libstatssocket",
390+
],
391+
}
392+
361393
genrule {
362394
name: "statslog_surfaceflinger.h",
363395
tools: ["stats-log-api-gen"],
364396
cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_surfaceflinger.h" +
365-
" --module surfaceflinger --namespace android,surfaceflinger,stats --bootstrap",
397+
" --module surfaceflinger --namespace android,surfaceflinger,stats",
366398
out: [
367399
"statslog_surfaceflinger.h",
368400
],
@@ -373,7 +405,7 @@ genrule {
373405
tools: ["stats-log-api-gen"],
374406
cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_surfaceflinger.cpp" +
375407
" --module surfaceflinger --namespace android,surfaceflinger,stats" +
376-
" --importHeader statslog_surfaceflinger.h --bootstrap",
408+
" --importHeader statslog_surfaceflinger.h",
377409
out: [
378410
"statslog_surfaceflinger.cpp",
379411
],

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#include <renderengine/RenderEngine.h>
8686
#include <renderengine/impl/ExternalTexture.h>
8787
#include <scheduler/FrameTargeter.h>
88-
#include <statslog_surfaceflinger.h>
88+
#include <statslog_surfaceflinger_bootstrap.h>
8989
#include <sys/types.h>
9090
#include <ui/ColorSpace.h>
9191
#include <ui/DebugUtils.h>

services/surfaceflinger/tests/unittests/Android.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ cc_defaults {
156156
"libpowermanager",
157157
"libprocessgroup",
158158
"libprotobuf-cpp-lite",
159-
"libstatslog_surfaceflinger",
159+
"libstatslog_surfaceflinger_bootstrap",
160160
"libsync",
161161
"libtracing_perfetto",
162162
"libui",

0 commit comments

Comments
 (0)