Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: content/renderer/gpu/frame_swap_message_queue.cc

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: amend comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/gpu/frame_swap_message_queue.cc
diff --git a/content/renderer/gpu/frame_swap_message_queue.cc b/content/renderer/gpu/frame_swap_message_queue.cc
index 5a313829cb14bdff612db09b06ed67116c6d0fec..84fcdd4e2ce8d7b3449906c6e081a8da2f453a9d 100644
--- a/content/renderer/gpu/frame_swap_message_queue.cc
+++ b/content/renderer/gpu/frame_swap_message_queue.cc
@@ -146,13 +146,17 @@ void FrameSwapMessageQueue::QueueMessageForFrame(MessageDeliveryPolicy policy,
GetSubQueue(policy)->QueueMessage(source_frame_number, msg.Pass(), is_first);
}
-void FrameSwapMessageQueue::DidSwap(int source_frame_number) {
+void FrameSwapMessageQueue::DidActivate(int source_frame_number) {
base::AutoLock lock(lock_);
-
visual_state_queue_->DrainMessages(source_frame_number,
&next_drain_messages_);
}
+void FrameSwapMessageQueue::DidSwap(int source_frame_number) {
+ base::AutoLock lock(lock_);
+ swap_queue_->DrainMessages(0, &next_drain_messages_);
+}
+
void FrameSwapMessageQueue::DidNotSwap(int source_frame_number,
cc::SwapPromise::DidNotSwapReason reason,
ScopedVector<IPC::Message>* messages) {
@@ -164,21 +168,18 @@ void FrameSwapMessageQueue::DidNotSwap(int source_frame_number,
visual_state_queue_->DrainMessages(source_frame_number, messages);
break;
case cc::SwapPromise::COMMIT_FAILS:
- // Do not queue any responses here.
- // If COMMIT_FAILS the renderer is shutting down, which will
- // result in the RenderFrameHostImpl destructor firing the
- // remaining response callbacks itself.
+ case cc::SwapPromise::ACTIVATION_FAILS:
+ // Do not queue any responses here. If ACTIVATION_FAILS or
+ // COMMIT_FAILS the renderer is shutting down, which will result
+ // in the RenderFrameHostImpl destructor firing the remaining
+ // response callbacks itself.
break;
- default:
- NOTREACHED();
}
}
void FrameSwapMessageQueue::DrainMessages(
ScopedVector<IPC::Message>* messages) {
lock_.AssertAcquired();
-
- swap_queue_->DrainMessages(0, messages);
messages->insert(messages->end(),
next_drain_messages_.begin(),
next_drain_messages_.end());
« no previous file with comments | « content/renderer/gpu/frame_swap_message_queue.h ('k') | content/renderer/gpu/frame_swap_message_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698