[waffle] [PATCH 1/8] android: avoid unneeded (function) forward declaration
Emil Velikov
emil.l.velikov at gmail.com
Tue Apr 5 22:52:18 UTC 2016
There is no specific reason why we cannot move the teardown function
prior to the setup one. Most (rest of) waffle does so already.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/waffle/android/droid_surfaceflingerlink.cpp | 32 +++++++++++--------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/src/waffle/android/droid_surfaceflingerlink.cpp b/src/waffle/android/droid_surfaceflingerlink.cpp
index dc55a8a..75803f3 100644
--- a/src/waffle/android/droid_surfaceflingerlink.cpp
+++ b/src/waffle/android/droid_surfaceflingerlink.cpp
@@ -59,8 +59,20 @@ const uint32_t droid_magic_surface_width = 32;
const uint32_t droid_magic_surface_height = 32;
const int32_t droid_magic_surface_z = 0x7FFFFFFF;
-void droid_tear_down_surfaceflinger_link(
- droid_surfaceflinger_container* pSFContainer);
+void
+droid_tear_down_surfaceflinger_link(
+ waffle::droid_surfaceflinger_container* pSFContainer)
+{
+ if( pSFContainer == NULL)
+ return;
+
+ if (pSFContainer->composer_client != NULL) {
+ pSFContainer->composer_client->dispose();
+ pSFContainer->composer_client = NULL;
+ }
+
+ delete pSFContainer;
+}
droid_surfaceflinger_container*
droid_setup_surfaceflinger_link()
@@ -224,22 +236,6 @@ droid_destroy_surface(
delete pANWContainer;
}
-
-void
-droid_tear_down_surfaceflinger_link(
- waffle::droid_surfaceflinger_container* pSFContainer)
-{
- if( pSFContainer == NULL)
- return;
-
- if (pSFContainer->composer_client != NULL) {
- pSFContainer->composer_client->dispose();
- pSFContainer->composer_client = NULL;
- }
-
- delete pSFContainer;
-}
-
}; // namespace waffle
extern "C" struct droid_surfaceflinger_container*
--
2.8.0
More information about the waffle
mailing list