summaryrefslogtreecommitdiff
path: root/libs/input/SpriteController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/SpriteController.cpp')
-rw-r--r--libs/input/SpriteController.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/libs/input/SpriteController.cpp b/libs/input/SpriteController.cpp
index c1868d3a94d6..eb2bc98ec9e9 100644
--- a/libs/input/SpriteController.cpp
+++ b/libs/input/SpriteController.cpp
@@ -144,16 +144,13 @@ void SpriteController::doUpdateSprites() {
}
}
- // Resize and/or reparent sprites if needed.
+ // Resize sprites if needed.
SurfaceComposerClient::Transaction t;
bool needApplyTransaction = false;
for (size_t i = 0; i < numSprites; i++) {
SpriteUpdate& update = updates.editItemAt(i);
- if (update.state.surfaceControl == nullptr) {
- continue;
- }
- if (update.state.wantSurfaceVisible()) {
+ if (update.state.surfaceControl != NULL && update.state.wantSurfaceVisible()) {
int32_t desiredWidth = update.state.icon.bitmap.width();
int32_t desiredHeight = update.state.icon.bitmap.height();
if (update.state.surfaceWidth < desiredWidth
@@ -173,12 +170,6 @@ void SpriteController::doUpdateSprites() {
}
}
}
-
- // If surface is a new one, we have to set right layer stack.
- if (update.surfaceChanged || update.state.dirty & DIRTY_DISPLAY_ID) {
- t.setLayerStack(update.state.surfaceControl, update.state.displayId);
- needApplyTransaction = true;
- }
}
if (needApplyTransaction) {
t.apply();
@@ -245,7 +236,7 @@ void SpriteController::doUpdateSprites() {
if (update.state.surfaceControl != NULL && (becomingVisible || becomingHidden
|| (wantSurfaceVisibleAndDrawn && (update.state.dirty & (DIRTY_ALPHA
| DIRTY_POSITION | DIRTY_TRANSFORMATION_MATRIX | DIRTY_LAYER
- | DIRTY_VISIBILITY | DIRTY_HOTSPOT | DIRTY_DISPLAY_ID))))) {
+ | DIRTY_VISIBILITY | DIRTY_HOTSPOT))))) {
needApplyTransaction = true;
if (wantSurfaceVisibleAndDrawn
@@ -454,15 +445,6 @@ void SpriteController::SpriteImpl::setTransformationMatrix(
}
}
-void SpriteController::SpriteImpl::setDisplayId(int32_t displayId) {
- AutoMutex _l(mController->mLock);
-
- if (mLocked.state.displayId != displayId) {
- mLocked.state.displayId = displayId;
- invalidateLocked(DIRTY_DISPLAY_ID);
- }
-}
-
void SpriteController::SpriteImpl::invalidateLocked(uint32_t dirty) {
bool wasDirty = mLocked.state.dirty;
mLocked.state.dirty |= dirty;