display states can't share the dirty flags
Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
This commit is contained in:
parent
111b2d8922
commit
818b46058a
@ -107,9 +107,11 @@ struct DisplayState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
eSurfaceChanged = 0x1,
|
eSurfaceChanged = 0x01,
|
||||||
eLayerStackChanged = 0x2,
|
eLayerStackChanged = 0x02,
|
||||||
eTransformChanged = 0x4
|
eOrientationChanged = 0x04,
|
||||||
|
eViewportChanged = 0x08,
|
||||||
|
eFrameChanged = 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t what;
|
uint32_t what;
|
||||||
|
@ -326,7 +326,7 @@ void Composer::setDisplayOrientation(const sp<IBinder>& token,
|
|||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
DisplayState& s(getDisplayStateLocked(token));
|
DisplayState& s(getDisplayStateLocked(token));
|
||||||
s.orientation = orientation;
|
s.orientation = orientation;
|
||||||
s.what |= DisplayState::eTransformChanged;
|
s.what |= DisplayState::eOrientationChanged;
|
||||||
mForceSynchronous = true; // TODO: do we actually still need this?
|
mForceSynchronous = true; // TODO: do we actually still need this?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ void Composer::setDisplayViewport(const sp<IBinder>& token,
|
|||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
DisplayState& s(getDisplayStateLocked(token));
|
DisplayState& s(getDisplayStateLocked(token));
|
||||||
s.viewport = viewport;
|
s.viewport = viewport;
|
||||||
s.what |= DisplayState::eTransformChanged;
|
s.what |= DisplayState::eViewportChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Composer::setDisplayFrame(const sp<IBinder>& token,
|
void Composer::setDisplayFrame(const sp<IBinder>& token,
|
||||||
@ -351,7 +351,7 @@ void Composer::setDisplayFrame(const sp<IBinder>& token,
|
|||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
DisplayState& s(getDisplayStateLocked(token));
|
DisplayState& s(getDisplayStateLocked(token));
|
||||||
s.frame = frame;
|
s.frame = frame;
|
||||||
s.what |= DisplayState::eTransformChanged;
|
s.what |= DisplayState::eFrameChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@ -142,7 +142,7 @@ void SurfaceFlinger::binderDied(const wp<IBinder>& who)
|
|||||||
Vector<ComposerState> state;
|
Vector<ComposerState> state;
|
||||||
Vector<DisplayState> displays;
|
Vector<DisplayState> displays;
|
||||||
DisplayState d;
|
DisplayState d;
|
||||||
d.what = DisplayState::eTransformChanged;
|
d.what = DisplayState::eOrientationChanged;
|
||||||
d.token = mDefaultDisplays[DisplayDevice::DISPLAY_ID_MAIN];
|
d.token = mDefaultDisplays[DisplayDevice::DISPLAY_ID_MAIN];
|
||||||
d.orientation = DisplayState::eOrientationDefault;
|
d.orientation = DisplayState::eOrientationDefault;
|
||||||
displays.add(d);
|
displays.add(d);
|
||||||
@ -1521,15 +1521,19 @@ uint32_t SurfaceFlinger::setDisplayStateLocked(const DisplayState& s)
|
|||||||
flags |= eDisplayTransactionNeeded;
|
flags |= eDisplayTransactionNeeded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (what & DisplayState::eTransformChanged) {
|
if (what & DisplayState::eOrientationChanged) {
|
||||||
if (disp.orientation != s.orientation) {
|
if (disp.orientation != s.orientation) {
|
||||||
disp.orientation = s.orientation;
|
disp.orientation = s.orientation;
|
||||||
flags |= eDisplayTransactionNeeded;
|
flags |= eDisplayTransactionNeeded;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (what & DisplayState::eFrameChanged) {
|
||||||
if (disp.frame != s.frame) {
|
if (disp.frame != s.frame) {
|
||||||
disp.frame = s.frame;
|
disp.frame = s.frame;
|
||||||
flags |= eDisplayTransactionNeeded;
|
flags |= eDisplayTransactionNeeded;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (what & DisplayState::eViewportChanged) {
|
||||||
if (disp.viewport != s.viewport) {
|
if (disp.viewport != s.viewport) {
|
||||||
disp.viewport = s.viewport;
|
disp.viewport = s.viewport;
|
||||||
flags |= eDisplayTransactionNeeded;
|
flags |= eDisplayTransactionNeeded;
|
||||||
|
Loading…
Reference in New Issue
Block a user