File tree Expand file tree Collapse file tree 4 files changed +2
-21
lines changed
Expand file tree Collapse file tree 4 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ status_t DisplayHardwareBase::DisplayEventThread::initCheck() const
122122
123123DisplayHardwareBase::DisplayHardwareBase (const sp<SurfaceFlinger>& flinger,
124124 uint32_t displayIndex)
125- : mCanDraw ( true ), mScreenAcquired (true )
125+ : mScreenAcquired (true )
126126{
127127 mDisplayEventThread = new DisplayEventThread (flinger);
128128}
@@ -133,14 +133,9 @@ DisplayHardwareBase::~DisplayHardwareBase()
133133 mDisplayEventThread ->requestExitAndWait ();
134134}
135135
136- void DisplayHardwareBase::setCanDraw (bool canDraw)
137- {
138- mCanDraw = canDraw;
139- }
140-
141136bool DisplayHardwareBase::canDraw () const
142137{
143- return mCanDraw && mScreenAcquired ;
138+ return mScreenAcquired ;
144139}
145140
146141void DisplayHardwareBase::releaseScreen () const
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ class DisplayHardwareBase
4343 bool isScreenAcquired () const ;
4444
4545 bool canDraw () const ;
46- void setCanDraw (bool canDraw);
4746
4847
4948private:
@@ -74,7 +73,6 @@ class DisplayHardwareBase
7473 };
7574
7675 sp<DisplayEventThreadBase> mDisplayEventThread ;
77- mutable int mCanDraw ;
7876 mutable int mScreenAcquired ;
7977};
8078
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ SurfaceFlinger::SurfaceFlinger()
8484 mBootTime(systemTime()),
8585 mVisibleRegionsDirty(false ),
8686 mHwWorkListDirty(false ),
87- mDeferReleaseConsole(false ),
8887 mFreezeDisplay(false ),
8988 mElectronBeamAnimationMode(0 ),
9089 mFreezeCount(0 ),
@@ -503,17 +502,9 @@ void SurfaceFlinger::handleConsoleEvents()
503502 SurfaceFlinger::turnElectronBeamOn (mElectronBeamAnimationMode );
504503 }
505504
506- if (mDeferReleaseConsole && hw.isScreenAcquired ()) {
507- // We got the release signal before the acquire signal
508- mDeferReleaseConsole = false ;
509- hw.releaseScreen ();
510- }
511-
512505 if (what & eConsoleReleased) {
513506 if (hw.isScreenAcquired ()) {
514507 hw.releaseScreen ();
515- } else {
516- mDeferReleaseConsole = true ;
517508 }
518509 }
519510
@@ -2177,7 +2168,6 @@ status_t SurfaceFlinger::turnElectronBeamOffImplLocked(int32_t mode)
21772168 glEnable (GL_SCISSOR_TEST);
21782169 hw.flip ( Region (hw.bounds ()) );
21792170
2180- hw.setCanDraw (false );
21812171 return NO_ERROR;
21822172}
21832173
@@ -2226,7 +2216,6 @@ status_t SurfaceFlinger::turnElectronBeamOnImplLocked(int32_t mode)
22262216 if (mode & ISurfaceComposer::eElectronBeamAnimationOn) {
22272217 electronBeamOnAnimationImplLocked ();
22282218 }
2229- hw.setCanDraw (true );
22302219
22312220 // make sure to redraw the whole screen when the animation is done
22322221 mDirtyRegion .set (hw.bounds ());
Original file line number Diff line number Diff line change @@ -363,7 +363,6 @@ class SurfaceFlinger :
363363 Region mWormholeRegion ;
364364 bool mVisibleRegionsDirty ;
365365 bool mHwWorkListDirty ;
366- bool mDeferReleaseConsole ;
367366 bool mFreezeDisplay ;
368367 int32_t mElectronBeamAnimationMode ;
369368 int32_t mFreezeCount ;
You can’t perform that action at this time.
0 commit comments