};
enum {
- eSurfaceChanged = 0x1,
- eLayerStackChanged = 0x2,
- eTransformChanged = 0x4
+ eSurfaceChanged = 0x01,
+ eLayerStackChanged = 0x02,
+ eOrientationChanged = 0x04,
+ eViewportChanged = 0x08,
+ eFrameChanged = 0x10
};
uint32_t what;
Mutex::Autolock _l(mLock);
DisplayState& s(getDisplayStateLocked(token));
s.orientation = orientation;
- s.what |= DisplayState::eTransformChanged;
+ s.what |= DisplayState::eOrientationChanged;
mForceSynchronous = true; // TODO: do we actually still need this?
}
Mutex::Autolock _l(mLock);
DisplayState& s(getDisplayStateLocked(token));
s.viewport = viewport;
- s.what |= DisplayState::eTransformChanged;
+ s.what |= DisplayState::eViewportChanged;
}
void Composer::setDisplayFrame(const sp<IBinder>& token,
Mutex::Autolock _l(mLock);
DisplayState& s(getDisplayStateLocked(token));
s.frame = frame;
- s.what |= DisplayState::eTransformChanged;
+ s.what |= DisplayState::eFrameChanged;
}
// ---------------------------------------------------------------------------
Vector<ComposerState> state;
Vector<DisplayState> displays;
DisplayState d;
- d.what = DisplayState::eTransformChanged;
+ d.what = DisplayState::eOrientationChanged;
d.token = mDefaultDisplays[DisplayDevice::DISPLAY_ID_MAIN];
d.orientation = DisplayState::eOrientationDefault;
displays.add(d);
flags |= eDisplayTransactionNeeded;
}
}
- if (what & DisplayState::eTransformChanged) {
+ if (what & DisplayState::eOrientationChanged) {
if (disp.orientation != s.orientation) {
disp.orientation = s.orientation;
flags |= eDisplayTransactionNeeded;
}
+ }
+ if (what & DisplayState::eFrameChanged) {
if (disp.frame != s.frame) {
disp.frame = s.frame;
flags |= eDisplayTransactionNeeded;
}
+ }
+ if (what & DisplayState::eViewportChanged) {
if (disp.viewport != s.viewport) {
disp.viewport = s.viewport;
flags |= eDisplayTransactionNeeded;