diff options
author | 2016-05-16 13:36:29 -0700 | |
---|---|---|
committer | 2016-05-16 13:36:29 -0700 | |
commit | 14e54ba747942312f5cd143a27e603eacd7573f7 (patch) | |
tree | e69d4e4557c1b1783f158bc7ba775b1e2c5aaca1 /services/surfaceflinger/MessageQueue.cpp | |
parent | 853f8f9c0b95120731459c1f7567af69ce457fe0 (diff) |
SF: Remove forced transaction on screenshot
Removes the forced transaction that screenshots used to perform
before capturing the screen. This was initially added to prevent
screenshot capture from sneaking in between when a transaction is
closed and when it is actually applied (at the next vsync), but in
the presence of deferred transactions today, forcing a transaction
to occur doesn't guarantee that the last transaction that
WindowManager pushed has actually been committed yet, since it may be
waiting for a buffer with which to synchronize.
If WindowManager wants to guarantee some arrangement of windows is
present for a screenshot, it needs to set the synchronous flag to
true when calling closeGlobalTransaction and wait for the call to
return.
Bug: 27098060
Change-Id: Iaa36d76df521076cc8ed16576f651543bae419a8
Diffstat (limited to 'services/surfaceflinger/MessageQueue.cpp')
-rw-r--r-- | services/surfaceflinger/MessageQueue.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp index 99efd3905f..34dc24b1f3 100644 --- a/services/surfaceflinger/MessageQueue.cpp +++ b/services/surfaceflinger/MessageQueue.cpp @@ -61,12 +61,6 @@ void MessageQueue::Handler::dispatchInvalidate() { } } -void MessageQueue::Handler::dispatchTransaction() { - if ((android_atomic_or(eventMaskTransaction, &mEventMask) & eventMaskTransaction) == 0) { - mQueue.mLooper->sendMessage(this, Message(MessageQueue::TRANSACTION)); - } -} - void MessageQueue::Handler::handleMessage(const Message& message) { switch (message.what) { case INVALIDATE: @@ -77,10 +71,6 @@ void MessageQueue::Handler::handleMessage(const Message& message) { android_atomic_and(~eventMaskRefresh, &mEventMask); mQueue.mFlinger->onMessageReceived(message.what); break; - case TRANSACTION: - android_atomic_and(~eventMaskTransaction, &mEventMask); - mQueue.mFlinger->onMessageReceived(message.what); - break; } } @@ -155,10 +145,6 @@ status_t MessageQueue::postMessage( */ #define INVALIDATE_ON_VSYNC 1 -void MessageQueue::invalidateTransactionNow() { - mHandler->dispatchTransaction(); -} - void MessageQueue::invalidate() { #if INVALIDATE_ON_VSYNC mEvents->requestNextVsync(); |