Loading services/surfaceflinger/Android.bp +41 −8 Original line number Diff line number Diff line Loading @@ -148,22 +148,35 @@ cc_defaults { }, } // libsurfaceflinger_backend_{headers|sources} are a step towards pulling out // the "backend" sources to clean up the dependency graph between // CompositionEngine and SurfaceFlinger. Completing the cleanup would require // moving the headers in particular so that the dependency can strictly be a // DAG. There would certainly be additional cleanups: VirtualDisplaySurface.cpp // and FrameBufferSurface.cpp likely belong in CompositionEngine for example. cc_library_headers { name: "libsurfaceflinger_headers", name: "libsurfaceflinger_backend_headers", export_include_dirs: ["."], static_libs: ["libserviceutils"], export_static_lib_headers: ["libserviceutils"], shared_libs: [ "android.hardware.configstore-utils", "android.hardware.configstore@1.0", "android.hardware.configstore@1.1", "libbinder_ndk", ], export_shared_lib_headers: [ "android.hardware.configstore-utils", "android.hardware.configstore@1.0", "android.hardware.configstore@1.1", "libbinder_ndk", ], } filegroup { name: "libsurfaceflinger_sources", name: "libsurfaceflinger_backend_sources", srcs: [ "BackgroundExecutor.cpp", "Client.cpp", "ClientCache.cpp", "Display/DisplayModeController.cpp", "Display/DisplaySnapshot.cpp", "DisplayDevice.cpp", "DisplayHardware/AidlComposerHal.cpp", "DisplayHardware/ComposerHal.cpp", "DisplayHardware/FramebufferSurface.cpp", Loading @@ -172,6 +185,26 @@ filegroup { "DisplayHardware/HidlComposerHal.cpp", "DisplayHardware/PowerAdvisor.cpp", "DisplayHardware/VirtualDisplaySurface.cpp", ], } cc_library_headers { name: "libsurfaceflinger_headers", export_include_dirs: ["."], static_libs: ["libserviceutils"], export_static_lib_headers: ["libserviceutils"], } filegroup { name: "libsurfaceflinger_sources", srcs: [ ":libsurfaceflinger_backend_sources", "BackgroundExecutor.cpp", "Client.cpp", "ClientCache.cpp", "Display/DisplayModeController.cpp", "Display/DisplaySnapshot.cpp", "DisplayDevice.cpp", "DisplayRenderArea.cpp", "Effects/Daltonizer.cpp", "FrontEnd/LayerCreationArgs.cpp", Loading services/surfaceflinger/CompositionEngine/Android.bp +7 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ cc_defaults { "android.hardware.graphics.composer@2.3-command-buffer", "android.hardware.graphics.composer@2.4-command-buffer", "android.hardware.graphics.composer3-command-buffer", "libsurfaceflinger_headers", "libsurfaceflinger_backend_headers", ], } Loading Loading @@ -141,6 +141,8 @@ cc_test { ], srcs: [ ":libcompositionengine_sources", ":libsurfaceflinger_backend_mock_sources", ":libsurfaceflinger_backend_sources", "tests/planner/CachedSetTest.cpp", "tests/planner/FlattenerTest.cpp", "tests/planner/LayerStateTest.cpp", Loading @@ -151,14 +153,14 @@ cc_test { "tests/DisplayTest.cpp", "tests/HwcAsyncWorkerTest.cpp", "tests/HwcBufferCacheTest.cpp", "tests/MockHWC2.cpp", "tests/MockHWComposer.cpp", "tests/MockPowerAdvisor.cpp", "tests/OutputLayerTest.cpp", "tests/OutputTest.cpp", "tests/ProjectionSpaceTest.cpp", "tests/RenderSurfaceTest.cpp", ], header_libs: [ "libsurfaceflinger_backend_mock_headers", ], static_libs: [ "libcompositionengine_mocks", "libgui_mocks", Loading @@ -167,6 +169,7 @@ cc_test { "libgtest", ], shared_libs: [ "libbinder_ndk", // For some reason, libvulkan isn't picked up from librenderengine // Probably ASAN related? "libvulkan", Loading services/surfaceflinger/CompositionEngine/tests/CompositionEngineTest.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -26,9 +26,8 @@ #include <gtest/gtest.h> #include <renderengine/mock/RenderEngine.h> #include "MockHWComposer.h" #include "TimeStats/TimeStats.h" #include "gmock/gmock.h" #include "mock/DisplayHardware/MockHWComposer.h" using namespace com::android::graphics::surfaceflinger; Loading services/surfaceflinger/CompositionEngine/tests/DisplayTest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -36,10 +36,10 @@ #include <ui/Rect.h> #include <ui/StaticDisplayInfo.h> #include "MockHWC2.h" #include "MockHWComposer.h" #include "MockPowerAdvisor.h" #include "ftl/future.h" #include "mock/DisplayHardware/MockHWC2.h" #include "mock/DisplayHardware/MockHWComposer.h" #include "mock/DisplayHardware/MockPowerAdvisor.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> Loading services/surfaceflinger/CompositionEngine/tests/MockHWC2.cppdeleted 100644 → 0 +0 −32 Original line number Diff line number Diff line /* * Copyright 2019 The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "MockHWC2.h" namespace android::HWC2 { // This will go away once HWC2::Layer is moved into the "backend" library Layer::~Layer() = default; namespace mock { // The Google Mock documentation recommends explicit non-header instantiations // for better compile time performance. Layer::Layer() = default; Layer::~Layer() = default; } // namespace mock } // namespace android::HWC2 Loading
services/surfaceflinger/Android.bp +41 −8 Original line number Diff line number Diff line Loading @@ -148,22 +148,35 @@ cc_defaults { }, } // libsurfaceflinger_backend_{headers|sources} are a step towards pulling out // the "backend" sources to clean up the dependency graph between // CompositionEngine and SurfaceFlinger. Completing the cleanup would require // moving the headers in particular so that the dependency can strictly be a // DAG. There would certainly be additional cleanups: VirtualDisplaySurface.cpp // and FrameBufferSurface.cpp likely belong in CompositionEngine for example. cc_library_headers { name: "libsurfaceflinger_headers", name: "libsurfaceflinger_backend_headers", export_include_dirs: ["."], static_libs: ["libserviceutils"], export_static_lib_headers: ["libserviceutils"], shared_libs: [ "android.hardware.configstore-utils", "android.hardware.configstore@1.0", "android.hardware.configstore@1.1", "libbinder_ndk", ], export_shared_lib_headers: [ "android.hardware.configstore-utils", "android.hardware.configstore@1.0", "android.hardware.configstore@1.1", "libbinder_ndk", ], } filegroup { name: "libsurfaceflinger_sources", name: "libsurfaceflinger_backend_sources", srcs: [ "BackgroundExecutor.cpp", "Client.cpp", "ClientCache.cpp", "Display/DisplayModeController.cpp", "Display/DisplaySnapshot.cpp", "DisplayDevice.cpp", "DisplayHardware/AidlComposerHal.cpp", "DisplayHardware/ComposerHal.cpp", "DisplayHardware/FramebufferSurface.cpp", Loading @@ -172,6 +185,26 @@ filegroup { "DisplayHardware/HidlComposerHal.cpp", "DisplayHardware/PowerAdvisor.cpp", "DisplayHardware/VirtualDisplaySurface.cpp", ], } cc_library_headers { name: "libsurfaceflinger_headers", export_include_dirs: ["."], static_libs: ["libserviceutils"], export_static_lib_headers: ["libserviceutils"], } filegroup { name: "libsurfaceflinger_sources", srcs: [ ":libsurfaceflinger_backend_sources", "BackgroundExecutor.cpp", "Client.cpp", "ClientCache.cpp", "Display/DisplayModeController.cpp", "Display/DisplaySnapshot.cpp", "DisplayDevice.cpp", "DisplayRenderArea.cpp", "Effects/Daltonizer.cpp", "FrontEnd/LayerCreationArgs.cpp", Loading
services/surfaceflinger/CompositionEngine/Android.bp +7 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ cc_defaults { "android.hardware.graphics.composer@2.3-command-buffer", "android.hardware.graphics.composer@2.4-command-buffer", "android.hardware.graphics.composer3-command-buffer", "libsurfaceflinger_headers", "libsurfaceflinger_backend_headers", ], } Loading Loading @@ -141,6 +141,8 @@ cc_test { ], srcs: [ ":libcompositionengine_sources", ":libsurfaceflinger_backend_mock_sources", ":libsurfaceflinger_backend_sources", "tests/planner/CachedSetTest.cpp", "tests/planner/FlattenerTest.cpp", "tests/planner/LayerStateTest.cpp", Loading @@ -151,14 +153,14 @@ cc_test { "tests/DisplayTest.cpp", "tests/HwcAsyncWorkerTest.cpp", "tests/HwcBufferCacheTest.cpp", "tests/MockHWC2.cpp", "tests/MockHWComposer.cpp", "tests/MockPowerAdvisor.cpp", "tests/OutputLayerTest.cpp", "tests/OutputTest.cpp", "tests/ProjectionSpaceTest.cpp", "tests/RenderSurfaceTest.cpp", ], header_libs: [ "libsurfaceflinger_backend_mock_headers", ], static_libs: [ "libcompositionengine_mocks", "libgui_mocks", Loading @@ -167,6 +169,7 @@ cc_test { "libgtest", ], shared_libs: [ "libbinder_ndk", // For some reason, libvulkan isn't picked up from librenderengine // Probably ASAN related? "libvulkan", Loading
services/surfaceflinger/CompositionEngine/tests/CompositionEngineTest.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -26,9 +26,8 @@ #include <gtest/gtest.h> #include <renderengine/mock/RenderEngine.h> #include "MockHWComposer.h" #include "TimeStats/TimeStats.h" #include "gmock/gmock.h" #include "mock/DisplayHardware/MockHWComposer.h" using namespace com::android::graphics::surfaceflinger; Loading
services/surfaceflinger/CompositionEngine/tests/DisplayTest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -36,10 +36,10 @@ #include <ui/Rect.h> #include <ui/StaticDisplayInfo.h> #include "MockHWC2.h" #include "MockHWComposer.h" #include "MockPowerAdvisor.h" #include "ftl/future.h" #include "mock/DisplayHardware/MockHWC2.h" #include "mock/DisplayHardware/MockHWComposer.h" #include "mock/DisplayHardware/MockPowerAdvisor.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> Loading
services/surfaceflinger/CompositionEngine/tests/MockHWC2.cppdeleted 100644 → 0 +0 −32 Original line number Diff line number Diff line /* * Copyright 2019 The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "MockHWC2.h" namespace android::HWC2 { // This will go away once HWC2::Layer is moved into the "backend" library Layer::~Layer() = default; namespace mock { // The Google Mock documentation recommends explicit non-header instantiations // for better compile time performance. Layer::Layer() = default; Layer::~Layer() = default; } // namespace mock } // namespace android::HWC2