summaryrefslogtreecommitdiff
path: root/opengl/tests/lib/WindowSurface.cpp
diff options
context:
space:
mode:
authorRobert Carr <racarr@google.com>2017-08-23 14:22:20 -0700
committerRobert Carr <racarr@google.com>2017-10-11 14:31:20 -0700
commit4cdc58f6840d15b4952149d2b345ec1f97d505bc (patch)
tree33427f28bf11a635036f582ac94384ac57ce7fcf /opengl/tests/lib/WindowSurface.cpp
parent049c1147a12684a6f95c6d8b326dc29208908d14 (diff)
SurfaceFlinger Transactions as distinct objects.
Essentially a process global singleton for transactions is not so useful once we make surface control public API as process isn't something an app developer is really thinking about. It's also nice that we get to delete two of the plumbing layers. Test: Boots Change-Id: I8864bd7e2f5865e3c0a425cf82f9928211911774
Diffstat (limited to 'opengl/tests/lib/WindowSurface.cpp')
-rw-r--r--opengl/tests/lib/WindowSurface.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/opengl/tests/lib/WindowSurface.cpp b/opengl/tests/lib/WindowSurface.cpp
index 142894524d..2b76279801 100644
--- a/opengl/tests/lib/WindowSurface.cpp
+++ b/opengl/tests/lib/WindowSurface.cpp
@@ -62,19 +62,10 @@ WindowSurface::WindowSurface() {
return;
}
- SurfaceComposerClient::openGlobalTransaction();
- err = sc->setLayer(0x7FFFFFFF); // always on top
- if (err != NO_ERROR) {
- fprintf(stderr, "SurfaceComposer::setLayer error: %#x\n", err);
- return;
- }
-
- err = sc->show();
- if (err != NO_ERROR) {
- fprintf(stderr, "SurfaceComposer::show error: %#x\n", err);
- return;
- }
- SurfaceComposerClient::closeGlobalTransaction();
+ SurfaceComposerClient::Transaction{}
+ .setLayer(sc, 0x7FFFFFFF)
+ .show(sc)
+ .apply();
mSurfaceControl = sc;
}