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

Side by Side Diff: content/renderer/gpu/renderer_compositor_frame_sink.cc

Issue 2740833005: [cc] Pass on BeginFrameAcks from CompositorEBFS through RWHVAura, DFH. (Closed)
Patch Set: address security comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/renderer_compositor_frame_sink.h" 5 #include "content/renderer/gpu/renderer_compositor_frame_sink.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 begin_frame_source_ = nullptr; 102 begin_frame_source_ = nullptr;
103 compositor_frame_sink_proxy_->ClearCompositorFrameSink(); 103 compositor_frame_sink_proxy_->ClearCompositorFrameSink();
104 compositor_frame_sink_filter_->RemoveHandlerOnCompositorThread( 104 compositor_frame_sink_filter_->RemoveHandlerOnCompositorThread(
105 routing_id_, compositor_frame_sink_filter_handler_); 105 routing_id_, compositor_frame_sink_filter_handler_);
106 106
107 cc::CompositorFrameSink::DetachFromClient(); 107 cc::CompositorFrameSink::DetachFromClient();
108 } 108 }
109 109
110 void RendererCompositorFrameSink::SubmitCompositorFrame( 110 void RendererCompositorFrameSink::SubmitCompositorFrame(
111 cc::CompositorFrame frame) { 111 cc::CompositorFrame frame) {
112 // We should only submit CompositorFrames with valid BeginFrameAcks.
113 DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber,
114 frame.metadata.begin_frame_ack.sequence_number);
112 { 115 {
113 std::unique_ptr<FrameSwapMessageQueue::SendMessageScope> 116 std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
114 send_message_scope = 117 send_message_scope =
115 frame_swap_message_queue_->AcquireSendMessageScope(); 118 frame_swap_message_queue_->AcquireSendMessageScope();
116 std::vector<std::unique_ptr<IPC::Message>> messages; 119 std::vector<std::unique_ptr<IPC::Message>> messages;
117 std::vector<IPC::Message> messages_to_deliver_with_frame; 120 std::vector<IPC::Message> messages_to_deliver_with_frame;
118 frame_swap_message_queue_->DrainMessages(&messages); 121 frame_swap_message_queue_->DrainMessages(&messages);
119 FrameSwapMessageQueue::TransferMessages(&messages, 122 FrameSwapMessageQueue::TransferMessages(&messages,
120 &messages_to_deliver_with_frame); 123 &messages_to_deliver_with_frame);
121 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, 124 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_,
(...skipping 23 matching lines...) Expand all
145 client_->ReclaimResources(resources); 148 client_->ReclaimResources(resources);
146 if (is_swap_ack) 149 if (is_swap_ack)
147 client_->DidReceiveCompositorFrameAck(); 150 client_->DidReceiveCompositorFrameAck();
148 } 151 }
149 152
150 bool RendererCompositorFrameSink::Send(IPC::Message* message) { 153 bool RendererCompositorFrameSink::Send(IPC::Message* message) {
151 return message_sender_->Send(message); 154 return message_sender_->Send(message);
152 } 155 }
153 156
154 } // namespace content 157 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698