summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-08-24 10:12:22 -0700
committerAndy McFadden <fadden@android.com>2012-08-24 10:12:38 -0700
commit9b6a395e65ff88ab79fe92d6f112c434441ca606 (patch)
treef7d9eba0e4d4a4c60d5222b60579e93d6f871d6e /services/surfaceflinger
parent53ade0853ca003c9e917b5e7d34e1b1338d7b87d (diff)
downloadframeworks_native-9b6a395e65ff88ab79fe92d6f112c434441ca606.zip
frameworks_native-9b6a395e65ff88ab79fe92d6f112c434441ca606.tar.gz
frameworks_native-9b6a395e65ff88ab79fe92d6f112c434441ca606.tar.bz2
Revert "Added display initialization method"
Something doesn't seem right (again). This reverts commit 53ade0853ca003c9e917b5e7d34e1b1338d7b87d. Change-Id: Id5786997ca9dd2a447363e8ac95213ea37468504
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp44
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h9
2 files changed, 11 insertions, 42 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9de3649..e6e258f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -137,8 +137,15 @@ void SurfaceFlinger::binderDied(const wp<IBinder>& who)
{
// the window manager died on us. prepare its eulogy.
- // restore initial conditions (default device unblank, etc)
- initializeDisplays();
+ // reset screen orientation
+ Vector<ComposerState> state;
+ Vector<DisplayState> displays;
+ DisplayState d;
+ d.what = DisplayState::eOrientationChanged;
+ d.token = mDefaultDisplays[DisplayDevice::DISPLAY_ID_MAIN];
+ d.orientation = DisplayState::eOrientationDefault;
+ displays.add(d);
+ setTransactionState(state, displays, 0);
// restart the boot-animation
startBootAnim();
@@ -425,9 +432,6 @@ status_t SurfaceFlinger::readyToRun()
// We're now ready to accept clients...
mReadyToRunBarrier.open();
- // set initial conditions (e.g. unblank default device)
- initializeDisplays();
-
// start boot animation
startBootAnim();
@@ -1706,36 +1710,6 @@ status_t SurfaceFlinger::onLayerDestroyed(const wp<LayerBaseClient>& layer)
// ---------------------------------------------------------------------------
-void SurfaceFlinger::onInitializeDisplays() {
- // reset screen orientation
- Vector<ComposerState> state;
- Vector<DisplayState> displays;
- DisplayState d;
- d.what = DisplayState::eOrientationChanged;
- d.token = mDefaultDisplays[DisplayDevice::DISPLAY_ID_MAIN];
- d.orientation = DisplayState::eOrientationDefault;
- displays.add(d);
- setTransactionState(state, displays, 0);
-
- // XXX: this should init default device to "unblank" and all other devices to "blank"
- onScreenAcquired();
-}
-
-void SurfaceFlinger::initializeDisplays() {
- class MessageScreenInitialized : public MessageBase {
- SurfaceFlinger* flinger;
- public:
- MessageScreenInitialized(SurfaceFlinger* flinger) : flinger(flinger) { }
- virtual bool handler() {
- flinger->onInitializeDisplays();
- return true;
- }
- };
- sp<MessageBase> msg = new MessageScreenInitialized(this);
- postMessageAsync(msg); // we may be called from main thread, use async message
-}
-
-
void SurfaceFlinger::onScreenAcquired() {
ALOGD("Screen about to return, flinger = %p", this);
sp<const DisplayDevice> hw(getDefaultDisplayDevice()); // XXX: this should be per DisplayDevice
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index b1fe738..1f79906 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -231,11 +231,9 @@ private:
void signalLayerUpdate();
void signalRefresh();
- // called on the main thread in response to initializeDisplays()
- void onInitializeDisplays();
- // called on the main thread in response to blank()
+ // called on the main thread in response to screenReleased()
void onScreenReleased();
- // called on the main thread in response to unblank()
+ // called on the main thread in response to screenAcquired()
void onScreenAcquired();
void handleMessageTransaction();
@@ -323,9 +321,6 @@ private:
/* ------------------------------------------------------------------------
* Display and layer stack management
*/
- // called when starting, or restarting after system_server death
- void initializeDisplays();
-
sp<const DisplayDevice> getDisplayDevice(DisplayID dpy) const {
return mDisplays.valueFor(dpy);
}