diff options
author | Robert Carr <racarr@google.com> | 2017-10-11 09:27:56 -0700 |
---|---|---|
committer | Robert Carr <racarr@google.com> | 2017-10-11 13:35:11 -0700 |
commit | 10553449b09f3fee2c69ea23c0331cd55a810692 (patch) | |
tree | 5b2fa409840d992ca9789b0ee597431eb8336775 | |
parent | 34ff6b696e5fc162b7155da6c935e31e792779e3 (diff) | |
download | Car-10553449b09f3fee2c69ea23c0331cd55a810692.tar.gz |
Track libgui changes
Test: Builds
Change-Id: I6ffeb0b84f55c83aca34585bdfbde55bb374623a
-rw-r--r-- | evs/app/WindowSurface.cpp | 17 | ||||
-rw-r--r-- | evs/sampleDriver/GlWrapper.cpp | 14 |
2 files changed, 11 insertions, 20 deletions
diff --git a/evs/app/WindowSurface.cpp b/evs/app/WindowSurface.cpp index a3f56bc2ca..04e7ac44d6 100644 --- a/evs/app/WindowSurface.cpp +++ b/evs/app/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) // always on top + .show(sc) + .apply(); mSurfaceControl = sc; } diff --git a/evs/sampleDriver/GlWrapper.cpp b/evs/sampleDriver/GlWrapper.cpp index eb45bc9ac2..3055ba0ff0 100644 --- a/evs/sampleDriver/GlWrapper.cpp +++ b/evs/sampleDriver/GlWrapper.cpp @@ -339,19 +339,19 @@ void GlWrapper::shutdown() { void GlWrapper::showWindow() { if (mFlingerSurfaceControl != nullptr) { - SurfaceComposerClient::openGlobalTransaction(); - mFlingerSurfaceControl->setLayer(0x7FFFFFFF); // always on top - mFlingerSurfaceControl->show(); - SurfaceComposerClient::closeGlobalTransaction(); + SurfaceComposerClient::Transaction{} + .setLayer(mFlingerSurfaceControl, 0x7FFFFFFF) // always on top + .show(mFlingerSurfaceControl) + .apply(); } } void GlWrapper::hideWindow() { if (mFlingerSurfaceControl != nullptr) { - SurfaceComposerClient::openGlobalTransaction(); - mFlingerSurfaceControl->hide(); - SurfaceComposerClient::closeGlobalTransaction(); + SurfaceComposerClient::Transaction{} + .hide(mFlingerSurfaceControl) + .apply(); } } |