rework screen on/off code
Change-Id: I13f71e850592a588bbd4805b1830c503bd4decb4
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 6fa81db..46bbab2 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -182,8 +182,17 @@
virtual status_t turnElectronBeamOff(int32_t mode);
virtual status_t turnElectronBeamOn(int32_t mode);
- void screenReleased(DisplayID dpy);
- void screenAcquired(DisplayID dpy);
+
+ // called when screen needs to turn off
+ void screenReleased();
+ // called when screen is turning back on
+ void screenAcquired();
+
+ // called on the main thread in response to screenReleased()
+ void onScreenReleased();
+ // called on the main thread in response to screenAcquired()
+ void onScreenAcquired();
+
status_t renderScreenToTexture(DisplayID dpy,
GLuint* textureName, GLfloat* uOut, GLfloat* vOut);
@@ -294,7 +303,6 @@
private:
void waitForEvent();
- void handleConsoleEvents();
void handleTransaction(uint32_t transactionFlags);
void handleTransactionLocked(uint32_t transactionFlags);
@@ -412,13 +420,6 @@
mutable Mutex mDestroyedLayerLock;
Vector<LayerBase const *> mDestroyedLayers;
- // atomic variables
- enum {
- eConsoleReleased = 1,
- eConsoleAcquired = 2
- };
- volatile int32_t mConsoleSignals;
-
// only written in the main thread, only read in other threads
volatile int32_t mSecureFrameBuffer;
};