SurfaceControl life-cycle refactoring.
We provide a method called "release" which allows the client
to drop its references without reparenting the SurfaceControl
to null as the destructor would. The Java and NDK API's already
have this method but it's not perfectly functional at the moment.
Additionally we remove the strange pass-through of clear to destroy
and expose destroy directly.
Test: Builds
Bug: 123587983
Change-Id: Ia89ada1476daef97e6f30d50a57065c3636a6489
diff --git a/services/surfaceflinger/tests/Stress_test.cpp b/services/surfaceflinger/tests/Stress_test.cpp
index 89c26f4..ee857b0 100644
--- a/services/surfaceflinger/tests/Stress_test.cpp
+++ b/services/surfaceflinger/tests/Stress_test.cpp
@@ -34,7 +34,7 @@
auto surf = client->createSurface(String8("t"), 100, 100,
PIXEL_FORMAT_RGBA_8888, 0);
ASSERT_TRUE(surf != nullptr);
- surf->clear();
+ surf.clear();
}
};