File tree Expand file tree Collapse file tree 4 files changed +22
-8
lines changed
Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ ifeq ($(TARGET_BOARD_PLATFORM), omap3)
3232endif
3333ifeq ($(TARGET_BOARD_PLATFORM ) , omap4)
3434 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
35+ LOCAL_CFLAGS += -DUSE_TRIPLE_BUFFERING
3536endif
3637ifeq ($(TARGET_BOARD_PLATFORM ) , s5pc110)
3738 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
Original file line number Diff line number Diff line change @@ -98,7 +98,12 @@ void Layer::onFirstRef()
9898 mSurfaceTexture = new SurfaceTextureLayer (mTextureName , this );
9999 mSurfaceTexture ->setFrameAvailableListener (new FrameQueuedListener (this ));
100100 mSurfaceTexture ->setSynchronousMode (true );
101+ #ifdef USE_TRIPLE_BUFFERING
102+ #warning "using triple buffering"
103+ mSurfaceTexture ->setBufferCountServer (3 );
104+ #else
101105 mSurfaceTexture ->setBufferCountServer (2 );
106+ #endif
102107}
103108
104109Layer::~Layer ()
Original file line number Diff line number Diff line change @@ -133,7 +133,8 @@ status_t MessageQueue::postMessage(
133133}
134134
135135void MessageQueue::invalidate () {
136- mHandler ->signalInvalidate ();
136+ // mHandler->signalInvalidate();
137+ mEvents ->requestNextVsync ();
137138}
138139
139140void MessageQueue::refresh () {
Original file line number Diff line number Diff line change @@ -403,7 +403,8 @@ bool SurfaceFlinger::threadLoop()
403403void SurfaceFlinger::onMessageReceived (int32_t what)
404404{
405405 switch (what) {
406- case MessageQueue::INVALIDATE: {
406+ case MessageQueue::REFRESH: {
407+ // case MessageQueue::INVALIDATE: {
407408 // check for transactions
408409 if (CC_UNLIKELY (mConsoleSignals )) {
409410 handleConsoleEvents ();
@@ -419,19 +420,25 @@ void SurfaceFlinger::onMessageReceived(int32_t what)
419420 // post surfaces (if needed)
420421 handlePageFlip ();
421422
422- signalRefresh ();
423- } break ;
423+ // signalRefresh();
424+ //
425+ // } break;
426+ //
427+ // case MessageQueue::REFRESH: {
424428
425- case MessageQueue::REFRESH: {
426- // NOTE: it is mandatory to call hw.compositionComplete()
427- // after handleRefresh()
428- const DisplayHardware& hw (graphicPlane (0 ).displayHardware ());
429429 handleRefresh ();
430430
431+ const DisplayHardware& hw (graphicPlane (0 ).displayHardware ());
432+
433+ // if (mDirtyRegion.isEmpty()) {
434+ // return;
435+ // }
436+
431437 if (CC_UNLIKELY (mHwWorkListDirty )) {
432438 // build the h/w work list
433439 handleWorkList ();
434440 }
441+
435442 if (CC_LIKELY (hw.canDraw ())) {
436443 // repaint the framebuffer (if needed)
437444 handleRepaint ();
You can’t perform that action at this time.
0 commit comments